3.2.0 • Published 9 years ago
d2l-web-library-loader v3.2.0
d2l-web-library-loader
Utility to get locations of 3rd party libraries used by a D2L instance, such as jQuery, jQuery UI, and Valence UI.
Installation
Install from NPM:
npm install web-library-loader
Usage
var webLibraryLoader = require('web-library-loader');
var opts = {
configPath: '/path/to/instanceDir/config'
};
webLibraryLoader.jquery( opts )
.then( function( location ) {
console.log( location );
} );
// same API for jqueryui and valenceui
webLibraryLoader.jqueryui( opts )
.then( ... );
webLibraryLoader.valenceui( opts )
.then( ... );
As you can see above, this library makes use of promises.
Options
- configPath: Path to the
config
directory under the root of your instance.
Contributing
Code Style
This repository is configured with EditorConfig rules and contributions should make use of them.