Skip to content

Instantly share code, notes, and snippets.

@caridy
Created October 22, 2012 17:01
Show Gist options
  • Save caridy/3932568 to your computer and use it in GitHub Desktop.
Save caridy/3932568 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML>
<html>
<head>
<script src="http://yui.yahooapis.com/combo?3.7.3/yui-base/yui-base.js&3.7.3/loader-base/loader-base.js"></script>
<script>
YUI.add('loader-app', function (Y) {
YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"json-stringify":{"requires":["yui-base"]},
"foo":{
"group": "myapp", // <--- this is a bit to allocate this module into a particular group
"requires":["yui-base"]
}
};
}, '', {requires:['loader-base']});
</script>
<script>
YUI.add('loader', function (Y) {
}, '', {use:['loader-base', 'loader-app']});
</script>
</head>
<body>
<script type="text/javascript">
YUI().use('foo', 'json-stringify');
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment