provide minimal requirejs config

This commit is contained in:
Brian Gough 2016-10-11 13:02:30 +01:00
parent 65bc8a84db
commit b9ecfcf41f

View file

@ -109,6 +109,19 @@ html(itemscope, itemtype='http://schema.org/Product')
- if(typeof(suppressNavbar) == "undefined")
include layout/navbar
script(type='text/javascript').
// minimal requirejs configuration (can be extended/overridden)
window.requirejs = {
"paths" : {
"moment": "libs/#{lib('moment')}"
},
"config":{
"moment":{
"noGlobal": true
}
}
};
block content
div(ng-controller="AbTestController")
- if(typeof(suppressFooter) == "undefined")
@ -123,17 +136,8 @@ html(itemscope, itemtype='http://schema.org/Product')
- if(typeof(suppressFooter) == "undefined")
script(type='text/javascript').
window.requirejs = {
"urlArgs" : "fingerprint=#{fingerprint(jsPath + 'main.js')}-#{fingerprint(jsPath + 'libs.js')}",
"paths" : {
"moment": "libs/#{lib('moment')}"
},
"config":{
"moment":{
"noGlobal": true
}
}
};
// extend requirejs config
window.requirejs.urlArgs = "fingerprint=#{fingerprint(jsPath + 'main.js')}-#{fingerprint(jsPath + 'libs.js')}"
script(
data-main=buildJsPath('main.js', {fingerprint:false}),
baseurl=fullJsPath,