Featuring some of the C preprocessor characteristics through special, configurable comments, jscc can be used in any type of files to build multiple versions of your software from the same code base.
With jscc, you have:
- Conditional inclusion/exclusion of code, based on compile-time variables*
- Replacement of variables inside the source (by value at compile-time)
- Source Map support
NOTE: This transform is WIP, sourceMap is not supported yet.
jscc is not a minifier tool, it only does well that it does...
npm i jsccify -D
jscc is a preprocessor, please put it first in the chain...
const jsccify =bundle...
/*#if _DEBUGconst mylib = require('mylib-debug');//#else */const mylib = ;//#endifmylib;
CONST mylib = ;mylib;
* jscc has the predefined
_VERSION varname, in addition to
You can read in the Wiki about:
This is work in progress, so please update jscc constantly, I hope the first stable version does not take too long.
* For me, write in english is 10x harder than coding JS, so contributions are welcome...
Don't forget to give me your star!