Skip to content

Instantly share code, notes, and snippets.

@caridy
Created November 2, 2010 00:33
Show Gist options
  • Save caridy/659116 to your computer and use it in GitHub Desktop.
Save caridy/659116 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>fast page</title>
<link type="text/css" href='http://company.cdn.com/combo?
1.1/rollout/app.css'>
</head>
<body class="yui3-skin-sam">
<script type="text/javascript">
YUI_config = { app: {tabview: '#demo'} };
(function(doc){
var script = doc.createElement('script');
script.src = 'http://company.cdn.com/combo?1.1/rollout/app.js';
doc.getElementsByTagName('head')[0].appendChild(script);
})(document);
</script>
<p> ~20k of HTML content in here... </p>
</body>
</html>
// yui.seed + yui.modules + gallery.modules
/* ... */
// app.module1 + app.module2 + app.moduleX
/* ... */
// init.js routine
YUI().use('tabview', function(Y) {
var config = Y.config.app || {};
if (config.tabview) {
new Y.TabView({
srcNode: config.tabview
});
}
});
YUI().use(function(Y) {
Y.Get.script([
'http://company.cdn.com/combo?1.1/rollout/lazy-app-1.js',
'http://company.cdn.com/combo?1.1/rollout/lazy-app-2.js'
]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment