livescript-transform-object-create

1.1.0 • Public • Published

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.

Webpack loader

If you are using Webpack you can try my loader whith support for this and other plugins.

License

BSD-3-Clause

Readme

Keywords

none

Package Sidebar

Install

npm i livescript-transform-object-create

Weekly Downloads

4

Version

1.1.0

License

BSD-3-Clause

Unpacked Size

9.49 kB

Total Files

11

Last publish

Collaborators

  • ketrab