mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-27 01:11:43 +00:00
Replace hard coded rich text hashed file path with registration system
This commit is contained in:
parent
a45dc69e4d
commit
3af10733cc
2 changed files with 9 additions and 2 deletions
|
@ -15,6 +15,7 @@ htmlEncoder = new require("node-html-encoder").Encoder("numerical")
|
||||||
hashedFiles = {}
|
hashedFiles = {}
|
||||||
Path = require 'path'
|
Path = require 'path'
|
||||||
Features = require "./Features"
|
Features = require "./Features"
|
||||||
|
Modules = require "./Modules"
|
||||||
|
|
||||||
jsPath =
|
jsPath =
|
||||||
if Settings.useMinifiedJs
|
if Settings.useMinifiedJs
|
||||||
|
@ -41,10 +42,9 @@ pathList = [
|
||||||
"#{jsPath}ide.js"
|
"#{jsPath}ide.js"
|
||||||
"#{jsPath}main.js"
|
"#{jsPath}main.js"
|
||||||
"#{jsPath}libraries.js"
|
"#{jsPath}libraries.js"
|
||||||
"#{jsPath}es/rich-text.js"
|
|
||||||
"/stylesheets/style.css"
|
"/stylesheets/style.css"
|
||||||
"/stylesheets/ol-style.css"
|
"/stylesheets/ol-style.css"
|
||||||
]
|
].concat(Modules.moduleAssetFiles(jsPath))
|
||||||
|
|
||||||
if !Settings.useMinifiedJs
|
if !Settings.useMinifiedJs
|
||||||
logger.log "not using minified JS, not hashing static files"
|
logger.log "not using minified JS, not hashing static files"
|
||||||
|
|
|
@ -43,6 +43,13 @@ module.exports = Modules =
|
||||||
moduleIncludesAvailable: (view) ->
|
moduleIncludesAvailable: (view) ->
|
||||||
return (Modules.viewIncludes[view] or []).length > 0
|
return (Modules.viewIncludes[view] or []).length > 0
|
||||||
|
|
||||||
|
moduleAssetFiles: (pathPrefix) ->
|
||||||
|
assetFiles = []
|
||||||
|
for module in @modules
|
||||||
|
for assetFile in module.assetFiles or []
|
||||||
|
assetFiles.push "#{pathPrefix}#{assetFile}"
|
||||||
|
return assetFiles
|
||||||
|
|
||||||
attachHooks: () ->
|
attachHooks: () ->
|
||||||
for module in @modules
|
for module in @modules
|
||||||
if module.hooks?
|
if module.hooks?
|
||||||
|
|
Loading…
Add table
Reference in a new issue