Skip to content

Instantly share code, notes, and snippets.

@caridy
Created March 6, 2013 01:21
Show Gist options
  • Save caridy/5095948 to your computer and use it in GitHub Desktop.
Save caridy/5095948 to your computer and use it in GitHub Desktop.
app.use(statichandler.public('yui', 'path/to/yui'));
/yui/ (public-path)
app.use('/static/', statichandler.public('yui', 'path/to/yui'));
/static/ yui/ (public-path)
app.use('/static/', statichandler.map('app', {
'foo.js': __dirname + '/foo.js';
}));
/static/ app/ (protected-path)
app.use(statichandler.combine({
comboBase: "/combo~",
comboSep: "~"
}));
/combo~yui/public-path~app/protected-path
app.use('/mycombo~', statichandler.combine({
comboSep: "~"
}));
/mycombo~yui/yui-base/yui-base-debug.js~app/foo.js
app.use('/static/', statichandler.public('assets', 'path/to/asset', {
validator: function (name, ext) {
}
}));
/static/ assets/ (public-path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment