A light weight Asynchronous module loader to load JavaScript modules.
- none
npm install async-loader --save-dev
##AsyncLoader~load(moduleName, path) Returns a promise
Params
- moduleName
String
- name of the exported source module loaded by the path script - path
String
- relative or absolute path of the script to be loaded
Example
<script src="node_modules/dist/async-loader.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
AsyncLoader.load('AsyncLoader', 'node_modules/dist/async-loader.js').then(function(Loader) {
//loaded module
console.log(Loader);
});
});
</script>
Default gulp tasks runs a sequence of tasks to clean, lint, test and build
gulp