Merge pull request #340 from sharelatex/bg-provide-default-requirejs-config

provide default requirejs config
This commit is contained in:
Brian Gough 2016-10-11 13:29:47 +01:00 committed by GitHub
commit cd01137e7d
3 changed files with 18 additions and 15 deletions

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")
@ -120,20 +133,10 @@ html(itemscope, itemtype='http://schema.org/Product')
span(ng-controller="ScribtexPopupController")
include scribtex-modal
- if(typeof(suppressFooter) == "undefined")
- if(typeof(suppressDefaultJs) == "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,

View file

@ -1,7 +1,7 @@
extends ../layout
block content
- locals.supressDefaultJs = true
- locals.suppressDefaultJs = true
script(data-main=jsPath+'main.js', src=jsPath+'libs/require.js', baseurl=jsPath)
script(src=buildJsPath('libs/recurly.min.js', {fingerprint:false}))

View file

@ -11,7 +11,7 @@ block scripts
window.couponCode = "#{couponCode}"
block content
- locals.supressDefaultJs = true
- locals.suppressDefaultJs = true
script(data-main=jsPath+'main.js', src=jsPath+'libs/require.js', baseurl=jsPath)