From b62fb3960cdc7fe90e75b04e6f88d91547049b46 Mon Sep 17 00:00:00 2001 From: James Allen Date: Wed, 8 Oct 2014 12:22:04 +0100 Subject: [PATCH] Fix javascript compiling when there are no modules --- services/web/Gruntfile.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/Gruntfile.coffee b/services/web/Gruntfile.coffee index 213dc1ebb2..a0f0b3b92e 100644 --- a/services/web/Gruntfile.coffee +++ b/services/web/Gruntfile.coffee @@ -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']