diff --git a/client/src/index.html b/client/src/index.html index 2f0ffbc95f..54c425ec73 100644 --- a/client/src/index.html +++ b/client/src/index.html @@ -110,9 +110,9 @@

{{ AppCtrl.project.name }}< diff --git a/gulpfile.js b/gulpfile.js index bf26d4456f..2f66973bf3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -26,6 +26,7 @@ const exec = require('child_process').exec; // toggle client javascript minification const isProduction = (process.env.NODE_ENV === 'production'); +const isDevelopment = (process.env.NODE_ENV !== 'production'); // the output folder for built server files const SERVER_FOLDER = './bin/server/'; @@ -240,7 +241,7 @@ gulp.task('client-compute-hashes', ['client-compile-js', 'client-compile-vendor' gulp.task('client-compile-assets', ['client-mv-static', 'client-compute-hashes'], () => gulp.src(paths.client.index) - .pipe(template({ isProduction: true })) + .pipe(template({ isProduction, isDevelopment })) .pipe(revReplace({ manifest: gulp.src(`${CLIENT_FOLDER}${MANIFEST_PATH}`) })) .pipe(gulp.dest(CLIENT_FOLDER)) ); diff --git a/package.json b/package.json index 232ee9d788..d2f3386de7 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "A rural hospital information management system.", "main": "sh/deploy.sh", "scripts": { - "app": "gulp build && cd bin && NODE_ENV=production node server/app.js", - "dev": "gulp build && cd bin && NODE_ENV=development node server/app.js", + "app": "NODE_ENV=production gulp build && cd bin && NODE_ENV=production node server/app.js", + "dev": "NODE_ENV=development gulp build && cd bin && NODE_ENV=development node server/app.js", "start": "sh/deploy.sh", "karma": "./node_modules/.bin/karma start --single-run --no-auto-watch --concurrency 1 karma.conf.js", "lint": "./sh/lint.sh",