Little JS cousin of Apache Ant
A Node.js build tool to gather/order/filter/mignify all your JS files and their dependencies. Greatly inspired from Apache Ant.
We used this tool in KadOH :
Q : In browser environement, this could be seen as an alternative to AMD loaders ?
Yes and no, the 2 approachs could and should live together. AMD is used to load modules and submodules that best fit the needs of the client browser avoiding the load of useless code. Nethertheless, some modules or submodules depends on other ones independently from the client browser configuration. If you have these useful dependencies gathered in one single file, you will probably spare multiple tiring asynchronous loads.
If you are asking this question, you should probably have a look to ender.
I'm on npm girls !
$ npm install jsCicada
You can find an example of use in the
sandbox directory : execute the
$ cd sandbox/$ node test-script.js
..and see what happened according to the
But you should also have a look at KadOH.
Include a valid
build.json file in the root directory of your project to configure your builds.
In any of your JS file indicate in the header (or anywhere else) to jsCicada which files you want to see included before this one in the build :
/** Dep : [src]/other/usefull.js* Dep : [jquery]/jquery.js*/// your awsome code goes here :var big = "bang";
Note : you can ommit the extension (
.js) that will be added afterwards.
2nd note : is it usefull to specify that when you add the same file as dependency several times (in different files), it will be included only once and at the right position ?
builder = builder;var b = ; //look for build.json in the working directory//orvar b = 'path/to/build.json';//orvar b = my_build_configuration : 'goes here';b;//orb;//orb;