For more information, check out the LiveScript site.
LiveScript 1.4.0 includes source maps, functional JSON command line processing, improved generator support, along with many bug fixes. Full changelog.
Package name change: LiveScript's package name on npm is now
livescript - all lower case (previously
LiveScript) - packages with upper case letters in their names are no longer allowed to publish updates on npm. Please use
npm uninstall -g LiveScript and then
npm install -g livescript.
-m, --map option when compiling to generate source maps. It has several possible values,
none - the default,
There are three files involved when generating sourcemaps:
a can optionally be embedded inside
b can optionally be embedded inside
c via a comment.
linked: No embedding,
c links to
b via a relative path, and same for
b is embedded inside
a is linked to
embedded: Everything is embedded inside
debug: Same as linked, but will also output a human readable representation of the source-node tree (similar to the output from the
ast option) to a '.map.debug' file.
embedded for everything else - it's self-contained and it's the only form most other tools such as browserify will accept as input. The file will be significantly larger, but you can remedy this by running a separate tool at the end of your build pipeline to split the output back into the
Thanks to Diggory Blake for his big pull request!
You can combine
-e,--eval with JSON data for functional style command line JSON processing. The JSON data you supply is bound to
this in the eval expression. You can either pipe in JSON, and use the
-j,--json flag, or use a file with the
$ lsc -e '@name' package.json "livescript" $ cat package.json | lsc -je '@name' "livescript"
You can include prelude.ls with the
$ lsc -de '@files |> map (.to-upper-case!)' package.json [ "LIB", "BIN", "README.MD", "LICENSE" ]
You can easily require modules as well, with the
lsc -r 'path' -de '@files |> map -> [it, path.resolve it]' package.json [ [ "lib", "/home/z/open-source/LiveScript/lib" ], [ "bin", "/home/z/open-source/LiveScript/bin" ], [ "README.md", "/home/z/open-source/LiveScript/README.md" ], [ "LICENSE", "/home/z/open-source/LiveScript/LICENSE" ] ]
Many fixes to
by in list slices, eg.
list[1 til 5 by 2], added backcall generators
*<-, and many other fixes.
Thanks to the people who have contributed to this release, including Ryan Hendrickson, Matt Brennan, skovsgaard, vendethiel, impinball, synapsos, Haspaker, Diggory Blake, Raine Virta, and Rafael Belvederese,
For more information on LiveScript, check out the LiveScript site.
For more on LiveScript and prelude.ls, follow @gkzahariev.comments powered by Disqus