only-loader
v0.3.0
Published
the only loader you need
Downloads
4
Readme
Only Loader
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