Skip to content

Instantly share code, notes, and snippets.

@wrumsby
Created July 20, 2013 10:58
Show Gist options
  • Select an option

  • Save wrumsby/6044648 to your computer and use it in GitHub Desktop.

Select an option

Save wrumsby/6044648 to your computer and use it in GitHub Desktop.
Shimming 3rd party libs with YUI Loader.
YUI.applyConfig({
groups: {
'cdnjs': {
base : '//cdnjs.cloudflare.com/ajax/libs',
modules: {
'moment' : {
path: '/moment.js/2.0.0/moment.min.js'
}
}
}
},
onProgress: function (e) {
if (e.data[0].name === 'moment') {
YUI.add('moment', function (Y){
Y.moment = moment;
});
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment