mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05: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 = {}
|
||||
Path = require 'path'
|
||||
Features = require "./Features"
|
||||
Modules = require "./Modules"
|
||||
|
||||
jsPath =
|
||||
if Settings.useMinifiedJs
|
||||
|
@ -41,10 +42,9 @@ pathList = [
|
|||
"#{jsPath}ide.js"
|
||||
"#{jsPath}main.js"
|
||||
"#{jsPath}libraries.js"
|
||||
"#{jsPath}es/rich-text.js"
|
||||
"/stylesheets/style.css"
|
||||
"/stylesheets/ol-style.css"
|
||||
]
|
||||
].concat(Modules.moduleAssetFiles(jsPath))
|
||||
|
||||
if !Settings.useMinifiedJs
|
||||
logger.log "not using minified JS, not hashing static files"
|
||||
|
|
|
@ -43,6 +43,13 @@ module.exports = Modules =
|
|||
moduleIncludesAvailable: (view) ->
|
||||
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: () ->
|
||||
for module in @modules
|
||||
if module.hooks?
|
||||
|
|
Loading…
Reference in a new issue