gkz / LiveScript

LiveScript is a language which compiles to JavaScript. It has a straightforward mapping to JavaScript and allows you to write expressive code devoid of repetitive boilerplate. While LiveScript adds many features to assist in functional style programming, it also has many improvements for object oriented and imperative programming.
http://livescript.net
MIT License
2.31k stars 156 forks source link

A live command, like the cake in CoffeeScript #1129

Open othelarian opened 4 months ago

othelarian commented 4 months ago

Origin of the PR

This PR is more like a fun addition to LiveScript. I always wonder why an equivalent to the CoffeeScript cake command doesn't exist un LiveScript, with a Livefile file at the package's root. So I did it.

What it does

I added scripts/build-live to compile the bin-src/live.ls script into bin/live, and also a Livefile as an example of what is possible.

It works like this:

Also, I added a new target in the makefile, live: bin/live, to run the script that compile bin-src/live.ls into bin/live.

ceremcem commented 3 months ago

Can we use this in place of Gulp?

othelarian commented 3 months ago

Can we use this in place of Gulp?

Completely, it is what I do for all my project, but in CoffeeScript. I also use bach, which is a lib gulp uses to create the pipeline under the hood. If you want the gulp pipelines you just have to add bach and vinyl.