mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #2265 from overleaf/as-move-vendored-deps
Move vendored dependencies out of output directory GitOrigin-RevId: bad086bdc2a80f9df5d3f934098cb7b05e8f6db5
This commit is contained in:
parent
4f637f14b5
commit
78c30015f4
668 changed files with 78 additions and 94 deletions
|
@ -1,5 +1,4 @@
|
|||
node_modules
|
||||
modules/**/scripts
|
||||
public/js
|
||||
public/src/vendor
|
||||
public/minjs
|
||||
modules/**/public/js
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
node_modules
|
||||
modules/**/scripts
|
||||
public/js
|
||||
public/src/vendor
|
||||
public/minjs
|
||||
modules/**/public/js
|
||||
|
|
|
@ -1053,7 +1053,11 @@ var defaultSettingsForAnonymousUser = userId => ({
|
|||
var THEME_LIST = []
|
||||
function generateThemeList() {
|
||||
const files = fs.readdirSync(
|
||||
Path.join(__dirname, '/../../../../public/js/', PackageVersions.lib('ace'))
|
||||
Path.join(
|
||||
__dirname,
|
||||
'/../../../../public/src/vendor/',
|
||||
PackageVersions.lib('ace')
|
||||
)
|
||||
)
|
||||
const result = []
|
||||
for (let file of files) {
|
||||
|
|
|
@ -145,8 +145,11 @@ module.exports = function(webRouter, privateApiRouter, publicApiRouter) {
|
|||
res.locals.buildJsPath = function(jsFile, opts = {}) {
|
||||
// Resolve path from webpack manifest file
|
||||
let path = webpackManifest[jsFile]
|
||||
// If not found in manifest, it is directly linked, so fallback to
|
||||
// relevant public directory
|
||||
|
||||
// HACK: If file can't be found within the webpack manifest, force url
|
||||
// to be relative to JS asset directory.
|
||||
// This should never happen in production, but it can happen in local
|
||||
// testing if webpack hasn't compiled
|
||||
if (!path) {
|
||||
path = Path.join(jsPath, jsFile)
|
||||
}
|
||||
|
@ -162,6 +165,10 @@ module.exports = function(webRouter, privateApiRouter, publicApiRouter) {
|
|||
return path
|
||||
}
|
||||
|
||||
res.locals.buildAssetsPath = function(path) {
|
||||
return `${jsPath}/${path}`
|
||||
}
|
||||
|
||||
res.locals.mathJaxPath = res.locals.buildJsPath('libs/mathjax/MathJax.js', {
|
||||
cdn: false,
|
||||
qs: { config: 'TeX-AMS_HTML,Safe' }
|
||||
|
|
|
@ -137,9 +137,9 @@ block content
|
|||
window.wikiEnabled = #{!!(settings.apis.wiki && settings.apis.wiki.url)};
|
||||
window.gitBridgePublicBaseUrl = '#{gitBridgePublicBaseUrl}'
|
||||
//- Set base path for Ace scripts loaded on demand/workers and don't use cdn
|
||||
window.aceBasePath = "#{buildJsPath(lib('ace'), {cdn:false})}"
|
||||
window.aceBasePath = "#{buildAssetsPath(lib('ace'))}"
|
||||
//- Set path for PDFjs CMaps
|
||||
window.pdfCMapsPath = "#{buildJsPath('cmaps/', {cdn: false})}"
|
||||
window.pdfCMapsPath = "#{buildAssetsPath('cmaps/')}"
|
||||
window.uiConfig = JSON.parse('!{StringHelper.stringifyJsonForScript(uiConfig)}');
|
||||
//- enable doc hash checking for all projects
|
||||
//- used in public/js/libs/sharejs.js
|
||||
|
|
|
@ -15,18 +15,17 @@ module.exports = function(config) {
|
|||
files: [
|
||||
'test/unit_frontend/bootstrap.js',
|
||||
// Include scripts that are injected into the page outside of webpack
|
||||
'public/js/libs/angular-1.6.4.min.js',
|
||||
'public/js/libs/jquery-1.11.1.min.js',
|
||||
'public/src/vendor/libs/angular-1.6.4.min.js',
|
||||
'public/src/vendor/libs/jquery-1.11.1.min.js',
|
||||
|
||||
// Allow mocking of angular
|
||||
'public/js/libs/angular-mocks.js',
|
||||
'public/src/vendor/libs/angular-mocks.js',
|
||||
|
||||
// Import all tests (see comment in the file for why this is necessary)
|
||||
'test/unit_frontend/import_tests.js',
|
||||
|
||||
// Include CSS (there is some in js/libs dir)
|
||||
'public/stylesheets/**/*.css',
|
||||
'public/js/libs/**/*.css'
|
||||
// Include CSS
|
||||
'public/stylesheets/**/*.css'
|
||||
],
|
||||
middleware: ['fake-img'],
|
||||
preprocessors: {
|
||||
|
|
BIN
services/web/public/js/libs/mathjax/.DS_Store
vendored
BIN
services/web/public/js/libs/mathjax/.DS_Store
vendored
Binary file not shown.
BIN
services/web/public/js/libs/mathjax/config/.DS_Store
vendored
BIN
services/web/public/js/libs/mathjax/config/.DS_Store
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue