ImEx.js
JavaScript 'import/export' compiler.####
Compiler allows you to use import/export directives and then compile the code to native JavaScript. It is very lightweight with low complexity.
Usage####
If you have objects World.animals
, World.Animal
And want to create new object like World.animals.Dog
you write
namespace Worldanimals; ; {};Dogprototype = Object;
instead of crappy long code like
Worldanimals {};WorldanimalsDogprototype = Object;
If you want to create global variable like World (window.World) you create like
namespace Global; ;
Compiling####
Execute in your cmd [in the folder of compiler util]
node build.js --include ../example/in/include.json --out ../example/out/build.js
Or use compiler.cmd
as in the example.