C-like JavaScript Preprocessor. It can combine multiple JavaScript files into one easily.
- Python (2.7 or 3.2 or 3.3 or 3.4)
base.js
a = 1;
//#include "other.js"
b = 2;
other.js
x = 1;
y = 2;
python jspp.py <base.js
a = 1;
x = 1;
y = 2;
b = 2;
base.js
a = 1;
//#ifdef ABC
b = 2;
//#endif
c = 3;
python jspp.py <base.js
a = 1;
c = 3;
python jspp.py <base.js -d ABC
a = 1;
b = 2;
c = 3;
-s
,--semicolon
Add semicolon after include-file.
-d <symbol>
,--define <symbol>
Define symbol for //#ifdef
or //#ifndef
.
-i <input-filename>
,--input <input-filename>
Specify input filename. If omitted, stdin will be used.
-o <output-filename>
,--output <output-filename>
Specify output filename. If omitted, stdout will be used.