diff --git a/services/web/Gruntfile.coffee b/services/web/Gruntfile.coffee index 374177e7d2..a0000360b3 100644 --- a/services/web/Gruntfile.coffee +++ b/services/web/Gruntfile.coffee @@ -205,11 +205,12 @@ module.exports = (grunt) -> modules: [ { name: "main", + exclude: ["libraries"] }, { name: "ide", - exclude: ["pdfjs-dist/build/pdf"] + exclude: ["pdfjs-dist/build/pdf", "libraries"] },{ - name: "libs" + name: "libraries" },{ name: "ace/mode-latex" },{ diff --git a/services/web/app/coffee/infrastructure/ExpressLocals.coffee b/services/web/app/coffee/infrastructure/ExpressLocals.coffee index 7cac6743e5..46f9eefb86 100644 --- a/services/web/app/coffee/infrastructure/ExpressLocals.coffee +++ b/services/web/app/coffee/infrastructure/ExpressLocals.coffee @@ -43,7 +43,7 @@ pathList = [ ["#{jsPath}libs/require.js"] ["#{jsPath}ide.js"] ["#{jsPath}main.js"] - ["#{jsPath}libs.js"] + ["#{jsPath}libraries.js"] ["#{jsPath}#{ace}/ace.js","#{jsPath}#{ace}/mode-latex.js","#{jsPath}#{ace}/worker-latex.js","#{jsPath}#{ace}/snippets/latex.js"] ["#{jsPath}libs/#{pdfjs}/pdf.js"] ["#{jsPath}libs/#{pdfjs}/pdf.worker.js"] diff --git a/services/web/app/views/layout.pug b/services/web/app/views/layout.pug index f32e90a6ed..5aa41c56c7 100644 --- a/services/web/app/views/layout.pug +++ b/services/web/app/views/layout.pug @@ -144,6 +144,7 @@ html(itemscope, itemtype='http://schema.org/Product') "moment": "libs/#{lib('moment')}", "fineuploader": "libs/#{lib('fineuploader')}", "main": "#{buildJsPath('main.js', {hashedPath:settings.useMinifiedJs, fingerprint:false, removeExtension:true})}", + "libraries": "#{buildJsPath('libraries.js', {hashedPath:settings.useMinifiedJs, fingerprint:false, removeExtension:true})}", }, "config":{ "moment":{ diff --git a/services/web/app/views/project/editor.pug b/services/web/app/views/project/editor.pug index 38ffdd3402..c3fd408e10 100644 --- a/services/web/app/views/project/editor.pug +++ b/services/web/app/views/project/editor.pug @@ -132,7 +132,8 @@ block requirejs "pdfjs-dist/build/pdf.worker": "#{pdfWorkerPath}", "ace": "#{lib('ace')}", "fineuploader": "libs/#{lib('fineuploader')}", - "ide": "#{buildJsPath('ide.js', {hashedPath:true, fingerprint:false, removeExtension:true})}" + "ide": "#{buildJsPath('ide.js', {hashedPath:settings.useMinifiedJs, fingerprint:false, removeExtension:true})}", + "libraries": "#{buildJsPath('libraries.js', {hashedPath:settings.useMinifiedJs, fingerprint:false, removeExtension:true})}", }, "waitSeconds": 0, "shim": { diff --git a/services/web/public/coffee/base.coffee b/services/web/public/coffee/base.coffee index 03d0ada365..c3847c9342 100644 --- a/services/web/public/coffee/base.coffee +++ b/services/web/public/coffee/base.coffee @@ -1,5 +1,5 @@ define [ - "libs" + "libraries" "modules/recursionHelper" "modules/errorCatcher" "modules/localStorage" diff --git a/services/web/public/coffee/libs.coffee b/services/web/public/coffee/libraries.coffee similarity index 100% rename from services/web/public/coffee/libs.coffee rename to services/web/public/coffee/libraries.coffee diff --git a/services/web/public/coffee/utils/underscore.coffee b/services/web/public/coffee/utils/underscore.coffee index 7a1551f90b..944abccb5d 100644 --- a/services/web/public/coffee/utils/underscore.coffee +++ b/services/web/public/coffee/utils/underscore.coffee @@ -1,5 +1,5 @@ define [ - "libs" + "libraries" ], () -> angular.module('underscore', []).factory '_', -> return window._