Created
October 10, 2011 16:13
-
-
Save davglass/1275713 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
YUI({ | |
combine: true, | |
modules: { | |
'my-module': { | |
fullpath: "my-module.js", | |
type: 'js', | |
requires: [ "event","event-custom","event-valuechange" ] | |
}, | |
'my-module-2': { | |
fullpath: "my-module-2.js", | |
type: 'js', | |
requires: [ "history","io","json-parse","node","node-event-simulate" ] | |
}, | |
} | |
}).use("my-module", "my-module-2", function(Y) { | |
//Now my-module, my-module-2 and all of their dependencies are loaded. | |
}); |
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
YUI.add("my-module-2", function(Y){ | |
Y.MyModule2 = { | |
init:function() { | |
Y.log('my module 2 inited'); | |
} | |
}; | |
}, "0.1"); |
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
YUI.add("my-module", function(Y){ | |
Y.MyModule = { | |
init:function() { | |
Y.log('my module inited'); | |
} | |
}; | |
}, "0.1"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment