Skip to content

Instantly share code, notes, and snippets.

@seaukara
Created February 24, 2017 20:30
Show Gist options
  • Save seaukara/8353a7b56200670bcc4d6059787da1e4 to your computer and use it in GitHub Desktop.
Save seaukara/8353a7b56200670bcc4d6059787da1e4 to your computer and use it in GitHub Desktop.
dojoConfig for JS app
var root = location.href.slice(0, location.href.lastIndexOf('/'));
console.log(root)
dojoConfig = {
isDebug: true,
parseOnLoad: true,
async: true,
baseURL: root,
foo: 'bar',
packages: [{
name: "root",
location: root
}, {
name: "widgets",
location: root +'/js/widgets'
},{
name: "application",
location: root+ '/js/application'
}]
};
if (location.search.match(/locale=([\w\-]+)/)) {
dojoConfig.locale = RegExp.$1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment