mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 17:51:51 +00:00
Fix javascript compiling when there are no modules
This commit is contained in:
parent
128c672edd
commit
b62fb3960c
1 changed files with 2 additions and 2 deletions
|
@ -244,11 +244,11 @@ module.exports = (grunt) ->
|
|||
grunt.registerTask 'compile:modules:client', 'Compile all the module client side code', moduleCompileClientTasks
|
||||
grunt.registerTask 'compile:modules:inject_clientside_includes', () ->
|
||||
content = fs.readFileSync("public/js/ide.js").toString()
|
||||
content = content.replace(/"__IDE_CLIENTSIDE_INCLUDES__"/g, moduleIdeClientSideIncludes.map((i) -> "\"#{i}\"").join(", "))
|
||||
content = content.replace(/, "__IDE_CLIENTSIDE_INCLUDES__"/g, moduleIdeClientSideIncludes.map((i) -> ", \"#{i}\"").join(""))
|
||||
fs.writeFileSync "public/js/ide.js", content
|
||||
|
||||
content = fs.readFileSync("public/js/main.js").toString()
|
||||
content = content.replace(/"__MAIN_CLIENTSIDE_INCLUDES__"/g, moduleMainClientSideIncludes.map((i) -> "\"#{i}\"").join(", "))
|
||||
content = content.replace(/, "__MAIN_CLIENTSIDE_INCLUDES__"/g, moduleMainClientSideIncludes.map((i) -> ", \"#{i}\"").join(""))
|
||||
fs.writeFileSync "public/js/main.js", content
|
||||
|
||||
grunt.registerTask 'compile:server', 'Compile the server side coffee script', ['clean:app', 'coffee:app', 'coffee:app_dir', 'compile:modules:server']
|
||||
|
|
Loading…
Reference in a new issue