JavaScript preprocessor
Minimal preprocessing with /*>*/
Usage
jspp input > output
Example
main.js
|
css/style.css
|
css/style-child.css |
script.js |
$ jspp example/main.js
var my_script;
var style = "html, body {margin:0; padding:0}\
.i-am-child {}\
.my-style {background: #fffacc}"
JavaScript preprocessor in a wild: GitHub Live Preview.
Installation
$ gem install jspp
Why reinvent the wheel?
Sprockets can't include non-JS files. JS preprocessor can.
Juicer can include one JS file to another via
@depend statement, but can't include CSS file to JS as multiline string.
JS preprocessor can do it via "/*> some_file */".