Forked from lsmith/Locally hosted YUI 3 over https without multiple requests
Created
August 7, 2009 21:45
-
-
Save foxxtrot/164192 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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