Skip to content

Instantly share code, notes, and snippets.

@lsmith
Created September 27, 2011 05:51
Show Gist options
  • Select an option

  • Save lsmith/1244430 to your computer and use it in GitHub Desktop.

Select an option

Save lsmith/1244430 to your computer and use it in GitHub Desktop.
YUI config for a module skin
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Test Page</title>
</head>
<body>
<div id="x">This is X</div>
<script src="http://yui.yahooapis.com/3.4.0/build/yui/yui.js"></script>
<script>
/**
Assumes the current directory has subdir structure
./
my/
my-mod/
my-mod.js
assets/
skins/
sam/
my-mod.css
**/
YUI({
groups: {
my: {
base: './my/',
modules: {
'my-mod': {
path: 'my-mod/my-mod.js',
skinnable: true
}
}
}
}
}).use('my-mod', function (Y) {});
</script>
</body>
</html>
#x { background: red; height: 100px; width: 100px; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment