Created
December 1, 2009 05:13
-
-
Save lsmith/246076 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /** | |
| * My fancy gallery module. This requires another non-YUI 3 script be included as | |
| * well. This can be accomplished by adding a 'modules' entry for it in the config | |
| * object passed to the YUI constructor. Do like'a dis: | |
| * YUI({ | |
| * modules: { | |
| * 'other-stuff': { // name it whatever you like, it's not a true module | |
| * fullpath: 'http://path.to/other/stuff.js' | |
| * }, | |
| * 'gallery-module': { // tack on the requirement here | |
| * fullpath: 'http://yui.yahooapis.com/gallery-2009.11.02-20/build/gallery-my-module/gallery-my-module-min.js', | |
| * requires: ['node','other-stuff'] | |
| * } | |
| * } | |
| * }).use('gallery-my-module', function (Y) { ... }); | |
| **/ | |
| // In the actual module add call, the 'other-stuff' module is not listed because | |
| // it is not a true YUI 3 module, and exists elsewhere on the internet. | |
| YUI.add('gallery-my-module', function (Y) { | |
| /* API etc */ | |
| }, '0.0.1', { requires: ['node'] }); | |
| YUI({ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment