Created
July 7, 2015 05:06
-
-
Save nirlanka/4cd5374c99395a216075 to your computer and use it in GitHub Desktop.
Sweet.js building with pre-written macros organized as modules for SublimeText 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
// dir:macros --> multiple macro-name.sjs | |
// create macros dir if not already in existence | |
// create empty sjs | |
// concatenate all macros to one macro file | |
// apply the macros and | |
// run resulting js | |
// note: each module must be exported with `export myMacro;` in it's file | |
"shell_cmd": "mkdir -p macros; touch ./macros/empty.sjs; cat ./macros/*.sjs > ./macros.sjs; sjs $file --module ./macros.sjs > \\$(basename $file .sjs).js; node \\$(basename $file .sjs).js", | |
"selector": ["source.sjs", "source.js"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment