Skip to content

Instantly share code, notes, and snippets.

@brianjmiller
Created April 21, 2011 13:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianjmiller/934486 to your computer and use it in GitHub Desktop.
Save brianjmiller/934486 to your computer and use it in GitHub Desktop.
Blog: YUI3 Locally Served - Configuration
<script type="text/javascript">
YUI_config = {
filter: "raw",
comboBase: "/combo?",
root: "vendor/yui3/build/",
base: "/vendor/yui3/build/",
combine: true,
insertBefore: "styleoverrides",
groups: {
// set up for locally served gallery
gallery: {
combine: true,
base: "/vendor/yui3-gallery/build/",
root: "vendor/yui3-gallery/build/",
comboBase: "/combo?",
patterns: {
"gallery-": {},
"gallerycss-": { type: "css" }
}
},
//
// Don't know why this is needed but it was confirmed as of 2010/08/23 with 3.2.0pr1
// and caused an odd error with Y.Lang when not included
//
gallerycss: {
combine: true,
comboBase: "/combo?",
root: "vendor/yui3-gallery/build/",
base: "/vendor/yui3-gallery/build/",
modules: {
"gallery-accordion-css": {
path: "gallery-accordion/assets/skins/sam/gallery-accordion.css",
type: "css"
},
"gallery-treeviewlite-core-css": {
path: "gallery-treeviewlite/assets/gallery-treeviewlite-core.css",
type: "css"
},
"gallery-treeviewlite-skin-css": {
path: "gallery-treeviewlite/assets/skins/sam/gallery-treeviewlite-skin.css",
type: "css"
}
}
},
// set up for locally served 2in3
yui2: {
base: "/vendor/yui-2in3/dist/2.8.2/build/",
combine: true,
comboBase: "/combo?",
root: "vendor/yui-2in3/dist/2.8.2/build/",
patterns: {
"yui2-": {
configFn: function (me) {
if(/-skin|reset|fonts|grids|base/.test(me.name)) {
me.type = "css";
me.path = me.path.replace(/\.js/, ".css");
me.path = me.path.replace(/\/yui2-skin/, "/assets/skins/sam/yui2-skin");
}
}
}
}
}
}
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment