0.0.2 • Published 8 years ago

mileyy v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

mileyy

A new js module loader from npm package to browser

API List

See d.ts definition: mileyy.d.ts.

    1. 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)
    1. async load modules
// global
mileyy.use(idList, callback)

// in factory
require.async(idList, callback)
    1. 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!

License

MIT