Module Resolution

JS++ module resolution - including module order resolution - is automatic.

Modules must be inputted to the compiler, as illustrated:

$ js++ module1.jspp module2.jspp main.jspp

Module input order does not matter, so the following are also valid:

$ js++ main.jspp module1.jspp module2.jspp
$ js++ module1.jspp main.jspp module2.jspp

What if I have hundreds of modules?

Requiring each individual module to be an input to the JS++ compiler can become cumbersome. If a project contains lots of modules, the JS++ compiler can accept an entire directory as input:

$ js++ src/

The compiler will search for .jspp, .js++, and .jpp files recursively (including all subdirectories). The search is case-insensitive.

Once all input source files have been discovered, JS++ will automatically determine the compilation order — even in the presence of cyclic dependencies and complex inheritance hierarchies.

External Links

Share

HTML | BBCode | Direct Link