morgas

0.8.8 • Public • Published

Morgas.js

JavaScript data processing framework for fun

ImportManager

tests

Usage

  • Browser
<script defer src="Morgas.js"></script>
  • Node
    1. cli
      npm install morgas
      
    2. js
      require("morgas");
      // creates global "Morgas" and "µ" namespaces
    In Node context every module is available via µ.getModule("<name>").

Node custom modules

In order to load custom modules you need to

µ.addModuleRegister(register,baseDir);
// or
µ.addResourceFolder(folder);

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=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:

(function(µ,SMOD,GMOD,HMOD,SC){
    
})(Morgas,Morgas.setModule,Morgas.getModule,Morgas.hasModule,Morgas.shortcut);

Readme

Keywords

none

Package Sidebar

Install

npm i morgas

Weekly Downloads

0

Version

0.8.8

License

MIT

Unpacked Size

218 kB

Total Files

73

Last publish

Collaborators

  • morgas