Skip to content

Instantly share code, notes, and snippets.

@arapehl
Created June 25, 2010 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arapehl/453552 to your computer and use it in GitHub Desktop.
Save arapehl/453552 to your computer and use it in GitHub Desktop.
YUI.add('base', function (Y) {
Y.namespace('proof');
}, '0.0.1');
<!DOCTYPE html>
<html>
<head>
<title>YUI 3 shared resources proof of concept</title>
</head>
<body>
<h1>YUI 3 shared resources proof of concept</h1>
<script type="text/javascript" src="http://yui.yahooapis.com/combo?3.1.1/build/yui/yui-min.js"></script>
<script type="text/javascript" src="base.js"></script>
<script type="text/javascript" src="module-1.js"></script>
<script type="text/javascript" src="module-2.js"></script>
<script>
YUI().use('module1', 'module2', function (Y) {
console.log(Y.proof);
});
</script>
</body>
</html>
YUI.add('module1', function (Y) {
}, '0.0.1', {require:['base']});
YUI.add('module2', function (Y) {
}, '0.0.1', {require:['base']});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment