Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foxxtrot/164192 to your computer and use it in GitHub Desktop.
Save foxxtrot/164192 to your computer and use it in GitHub Desktop.
// Step 1. Create a module config object to pass to the YUI constructor
var myModules = {
bacon: {
path: '/path/to/rollup/file.js',
supersedes: ['list','of','the','concated','modules'],
rollup: 3
}
};
// Step2 . Instantiate your YUI with your module config and use()
YUI({ modules: myModules }).use('list', 'of', 'modules', function (Y) {
/* all rolled up modules are available and only one https request was made */
});
// Even though only 3 of the modules are being loaded, it'll load the rollup to save the HTTP request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment