Morgas.js
JavaScript data processing framework for fun
Usage
- Browser
- Node
- cli
npm install morgas
- js;// creates global "Morgas" and "µ" namespaces
µ.getModule("<name>")
. - cli
Node custom modules
In order to load custom modules you need to
µ;// orµ;
In resource folders the filename is automatically also the module name.
Build
npm build script for bundles
npm run build <bundleName.js> <module> [module [...]]
output
build/bundleName.js
build/bundleName.js.map
You can also write your own script with require("Morgas/lib/dependencyParser")
and µ.getModule("DependencyResolver")
.
dependencyParser
checks for
SC=;
and parses every shortcut as "use" dependency and every GMOD("<moduleName>")
before that as "hard" dependency.
therefore it is recommended to use an IIFE like this:
{ }MorgasMorgassetModuleMorgasgetModuleMorgashasModuleMorgasshortcut;