-
-
Save stlsmiths/3879402 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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Your Title</title> | |
<!-- Enter any page specific CSS link files --> | |
<link href="/yui/google-code-prettify/prettify.css" rel="stylesheet" type="text/css" /> | |
<!-- Enter any local CSS declarations here --> | |
<style></style> | |
</head> | |
<body class='yui3-skin-sam'> | |
<!-- my page markup goes here ..... --> | |
<!-- Lastly, and at the bottom of the BODY, put your JS code ... --> | |
<script src="http://yui.yahooapis.com/3.7.2/build/yui/yui-min.js"></script> | |
<!-- this is a knockoff of Dav Glass's https://gist.github.com/1275713 example --> | |
YUI.add("my-module", function(Y){ | |
Y.MyModule = { | |
init:function() { | |
Y.log('my module inited'); | |
} | |
}; | |
}, "0.1"); | |
YUI.add("my-module-2", function(Y){ | |
Y.MyModule2 = { | |
init:function() { | |
Y.log('my module 2 inited'); | |
} | |
}; | |
}, "0.1"); | |
YUI({ | |
combine: true, | |
modules: { | |
'my-local-css': { | |
fullpath: "my-module-css.css", | |
type: 'css' | |
}, | |
'my-module': { | |
fullpath: "my-module.js", | |
type: 'js', | |
requires: [ "event","event-custom","event-valuechange", "my-local-css" ] | |
}, | |
'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. | |
}); | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment