0.0.2 • Published 8 years ago
mileyy v0.0.2
mileyy
A new js module loader from npm package to browser
API List
See d.ts
definition: mileyy.d.ts.
- register a module
/**
* register a module
* @param {string} id - the module id
* @param {string[]} depList - the dependencies
* @param {Factory} factory - the factory function
*
* the factory is a function, with three params:
* Factory(require, exports, module), same to Cmd
*/
define(id, depList, factory)
- async load modules
// global
mileyy.use(idList, callback)
// in factory
require.async(idList, callback)
- sync load a module
// only in factory
require(id)
explaination
there is so many module loader on github, just like require.js, sea.js,
webpack, browserify, and so on. And this is another **SMALL**, **FAST**,
**ASYNC** one!