3.0.4 • Published 8 years ago
filestack-loader v3.0.4
Loader
Installation
npm install filestack-loaderUsage
Loading JavaScript Modules
If you have two modules a.js and b.js and you want to load b into a...
// file a.js
import loader from 'loader';
loader.loadModule('url/to/b.js').then((b) => {
b.helloWorld();
});// file b.js
import loader from 'loader';
const api = {
helloWorld() {
console.log('Hello world!');
},
};
// Module need to "tell" the loader that it's loaded and ready.
loader.registerReadyModule(api);Loading CSS
import loader from 'loader';
loader.loadCss('url/to/style.css').then(() => {
console.log('Style loaded!');
});Development
Setup
npm installTesting
Unit
npm testThis command opens in the browser semi-manual tests. Those tests don't have watch, so you need to refire the command with each change.