[ISC] Inline Source Composer
Compose a javascript application into one distributable file by using annotations in your code.
// main.js { var some_code_here; /** * Include foo.js here. * @include("src/foo.js") * @include("src/bar.js") */ console;}; // src/foo.jsvar string = 'This is foo.js'; // src/bar.jsvar bar = string;
When compiled, the code looks like this:
{ var some_code_here; var string = 'This is foo.js'; var bar = string; console;};
Compile the code using the command-line app:
isc <input-file> <output-file> --verbose --minify
Or use node.js:
input : 'in.js' // Input file output : 'out.js' // Output file verbose : true // Display verbose output? minify : true // Minify source? (only works if 'output' is also specified;
Note; If no output file is specified, the compiled source is printed instead. Minifying the source will not work in this case. Minified source is exported as .min.js. Taking the example above, the file
out.min.js
would be generated.