mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #2029 from overleaf/ta-build-main-recurly-3
Load Recurly JS Separately GitOrigin-RevId: 8baa2be76fa9d8a47676bc0bd0a80f4c05cc1600
This commit is contained in:
parent
befa4e932e
commit
7785c7b59e
8 changed files with 10 additions and 31 deletions
|
@ -56,9 +56,6 @@ module.exports = function(grunt) {
|
|||
},
|
||||
{
|
||||
name: 'ace/worker-latex'
|
||||
},
|
||||
{
|
||||
name: 'main-recurly'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -101,16 +101,16 @@ minify_css: $(CSS_FILES)
|
|||
minify_es:
|
||||
npm -q run webpack:production
|
||||
|
||||
compile: $(DIST_FILES) css public/js/main.js public/js/main-recurly.js public/js/ide.js
|
||||
compile: $(DIST_FILES) css public/js/main.js public/js/ide.js
|
||||
@$(MAKE) compile_modules
|
||||
|
||||
compile_full:
|
||||
$(BABEL) public/src --out-dir public/js
|
||||
$(BABEL) test/unit_frontend/src --out-dir test/unit_frontend/js
|
||||
rm -f public/js/ide.js public/js/main.js public/js/main-recurly.js # We need to generate ide.js, main.js, main-recurly.js manually later
|
||||
rm -f public/js/ide.js public/js/main.js # We need to generate ide.js, main.js, manually later
|
||||
$(MAKE) css_full
|
||||
$(MAKE) compile_modules_full
|
||||
$(MAKE) compile # ide.js, main.js, main-recurly.js, share.js, and anything missed
|
||||
$(MAKE) compile # ide.js, main.js, share.js, and anything missed
|
||||
|
||||
compile_css_full:
|
||||
$(MAKE) css_full
|
||||
|
@ -150,7 +150,7 @@ $(MODULE_MAKEFILES): Makefile.module
|
|||
clean: clean_frontend clean_css clean_tests
|
||||
|
||||
clean_frontend:
|
||||
rm -rf public/js/{analytics,directives,es,filters,ide,main,main-recurly,modules,services,utils}
|
||||
rm -rf public/js/{analytics,directives,es,filters,ide,main,modules,services,utils}
|
||||
rm -f public/js/*.{js,map}
|
||||
|
||||
clean_css:
|
||||
|
|
|
@ -61,7 +61,6 @@ const pathList = [
|
|||
`${jsPath}libs/require.js`,
|
||||
`${jsPath}ide.js`,
|
||||
`${jsPath}main.js`,
|
||||
`${jsPath}main-recurly.js`,
|
||||
`${jsPath}libraries.js`,
|
||||
'/stylesheets/style.css',
|
||||
'/stylesheets/light-style.css',
|
||||
|
|
|
@ -125,8 +125,7 @@ html(
|
|||
"moment": "libs/#{lib('moment')}",
|
||||
"fineuploader": "libs/#{lib('fineuploader')}",
|
||||
"main": "#{buildJsPath('main.js', {hashedPath:settings.useMinifiedJs, removeExtension:true})}",
|
||||
"libraries": "#{buildJsPath('libraries.js', {hashedPath:settings.useMinifiedJs, removeExtension:true})}",
|
||||
"recurly": "https://js.recurly.com/v4/recurly"
|
||||
"libraries": "#{buildJsPath('libraries.js', {hashedPath:settings.useMinifiedJs, removeExtension:true})}"
|
||||
},
|
||||
"config":{
|
||||
"moment":{
|
||||
|
|
|
@ -2,12 +2,8 @@ extends ../layout
|
|||
|
||||
include ./dashboard/_team_name_mixin
|
||||
|
||||
block requirejs-init
|
||||
script(
|
||||
data-main=buildJsPath("main-recurly.js", {hashedPath:false}),
|
||||
baseurl=fullJsPath,
|
||||
src=buildJsPath('libs/require.js', {hashedPath:true})
|
||||
)
|
||||
block scripts
|
||||
script(src="https://js.recurly.com/v4/recurly.js")
|
||||
|
||||
block content
|
||||
.content.content-alt(ng-cloak)
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
extends ../layout
|
||||
|
||||
block requirejs-init
|
||||
script(
|
||||
data-main=buildJsPath("main-recurly.js", {hashedPath:false}),
|
||||
baseurl=fullJsPath,
|
||||
src=buildJsPath('libs/require.js', {hashedPath:true})
|
||||
)
|
||||
|
||||
block scripts
|
||||
script(src="https://js.recurly.com/v4/recurly.js")
|
||||
script(type='text/javascript').
|
||||
window.countryCode = '#{countryCode}'
|
||||
window.plan_code = '#{plan_code}'
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
// main bundle plus recurly (loaded externaly from CDN) and all files requiring
|
||||
// Recurly JS
|
||||
define([
|
||||
'main',
|
||||
'recurly',
|
||||
'main/subscription-dashboard',
|
||||
'main/new-subscription'
|
||||
], function() {})
|
|
@ -22,6 +22,8 @@ define([
|
|||
'main/bonus',
|
||||
'main/system-messages',
|
||||
'main/translations',
|
||||
'main/subscription-dashboard',
|
||||
'main/new-subscription',
|
||||
'main/annual-upgrade',
|
||||
'main/announcements',
|
||||
'main/register-users',
|
||||
|
|
Loading…
Reference in a new issue