Lift JS aims to raise old browers up to the same level as modern browsers. It is a collection of AMD modules loaded on-demand to shim missing JS features.
Load LiftJS with your favorite AMD loader.
Here are some code examples to show how to use lift JS with various AMD loaders.
require.config({
deps: ['liftjs'],
packages: [
{
name: 'liftjs',
location: 'lib/liftjs/',
main: 'lift'
}
]
});
// All LiftJS dependencies loaded before main is executed.
require(['main'], callback);
require({ paths: { lib: 'lib/' } }, ['lib/liftjs/lift'], function() {
// lift.js and all dependencies are loaded.
require(['main', 'other'], callback);
});
curl.config({
preloads: ['liftjs'],
packages: [
{
name: 'liftjs',
path: 'lib/liftjs/',
main: 'lift'
}
]
});
curl(['main', 'other', 'another' /* etc */]).then(callback, errorback);
// lift.js and all dependencies are loaded before the .next() call
curl({ paths: { lib: 'lib/' } }, ['lib/liftjs/lift']).next(['main'], callback);