0.3.0 • Published 10 years ago

only-loader v0.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

Only Loader

Build Status Dependency Status devDependency Status

The only loader you'll need to load scripts.

Usage

It's damn easy to use:

Loader(scripts, async);

scripts: The scripts you want to load, it can be array or string (split by comma) async: Executes the codes asynchronously or not (in order)

Example

Loader(['a.js', 'b.js']); // Load codes asynchronously but executes in order
Loader('a.js,b.js', true); // Load codes asynchronously and executes as soon as possible
Loader(['a.js', 'b.js', function() {
  // do something after a, b
}, 'c.js', 'd.js']); // Load a and b, then execute the function, then load c and d

Just try it!

Development

npm install
npm run compress