livescript-transform-object-create
v1.1.0
Published
LiveScript plugin that converts unary operator ^^ to Object.create
Downloads
23
Readme
Transform plugin for livescript converts unary clone operator ^^
to Object.create
Repository on github
input
john = ^^Person
output
var john;
john = Object.create(Person);
Installation
npm i -D livescript-transform-object-create
Usage
simple use in livescript file
require! <[ livescript-transform-object-create/register main]>
and in simple use in js file
require ('livescript-transform-object-create/register')
require ('main') // this is livescript file
CLI
Please stop using cli for any serious task, write scripts in real languages (there are so many to choose) e.g.
lsc serious-task.ls
node serious-task.js
python serious-task.py
If you really must to use cli just add require plugin file to the command.
But don't say I didn't warn you!
compiling
lsc -cr livescript-transform-object-create/register app.ls
running
node -r livescript-transform-object-create/register app.ls
Integration
Atom
If you are using Atom editor you may be interested in my packages which provide realtime code preview supporting this plugin.
- livescript-ide-preview - show transpiled code
- atom-livescript-provider - provides compilation service
Webpack loader
If you are using Webpack you can try my loader whith support for this and other plugins.