Skip to content

Instantly share code, notes, and snippets.

@foxxtrot
Last active December 13, 2015 19:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save foxxtrot/4962025 to your computer and use it in GitHub Desktop.
Save foxxtrot/4962025 to your computer and use it in GitHub Desktop.
A way to override the Gallery location in YUI. This is awful, but it works by overriding the defaults on all future YUI instances. You're better off applying it in the config object to YUI() or your YUI_config.
// YUI.Env is not populated until you build a YUI base object once. You can cache a reference to it here, if you'd like,
// but you probably don't want to require anything. You certainly don't want to require anything from the Gallery.
YUI()
YUI.Env[YUI.version].groups.gallery.base = "http://path.to.my.server/lib/yui-gallery/build";
YUI.Env[YUI.version].groups.gallery.comboBase = "http://path.to.my.server/combo?
YUI.Env[YUI.version].groups.gallery.root = "lib/yui-gallery/build";
// This is how you *should* do this, ignore everything above:
YUI({groups: { gallery: { base: "http://path.to.my.server/lib/yui-gallery/build", comboBase: "http://path.to.my.server/combo?", root: "lib/yui-gallery/build" } } });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment