1.0.2 • Published 6 years ago

livescript-transform-top-level-await v1.0.2

Weekly downloads
5
License
BSD-3-Clause
Repository
gitlab
Last release
6 years ago

Transform plugin for livescript

Enables use of await in top level block.

This isn't real plugin because livescript doesn't have support for it. It's more like a hack thats is mutating AST generated by livescript.

Usage

Assuming you have file name app.ls

simple use

require! <[ livescript livescript-transform-top-level-await]>
foo = Promise.resolve \foo
bar = Promise.resolve \bar
foo-bar = "#{await foo} #{await bar}"

installing inside custom livescript implementation

require! <[ livescript livescript-transform-top-level-await/lib/plugin]>
plugin.install livescript
livescript.compile source-code

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-top-level-await app.ls

running

lsc -r livescript-transform-top-level-await app.ls

License

BSD-3-Clause

1.0.2

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago