From 79b907f4a2ccee67fe10a8cd919c05b3b769be83 Mon Sep 17 00:00:00 2001 From: dheeyi william Date: Wed, 4 Oct 2017 15:34:37 -0400 Subject: [PATCH] FBI-2182 Web Entry 2.0 User field Improvements request --- Rakefile | 6 +++--- gulpfile.js | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Rakefile b/Rakefile index 75b4bb983..ca5f47cd6 100644 --- a/Rakefile +++ b/Rakefile @@ -139,10 +139,10 @@ def generateEnviromentVariables() puts "Creating System Constants..." content = "var __env = __env || {};" file = File.read('./config/enviromentvariables.json') - data_hash = JSON.parse(file) - content = content + "__env.USER_GUEST = " + JSON.generate(data_hash['constants']['userguest']) + dataUser = JSON.parse(file) + content = content + "__env.USER_GUEST = " + JSON.generate(dataUser['constants']['userguest']) dir = "vendor/colosa/MichelangeloFE/src/enviroment/" - File.open(dir +'constans.js', 'w') { |fileWrite| + File.open(dir +'constants.js', 'w') { |fileWrite| fileWrite.write content + ';' } end diff --git a/gulpfile.js b/gulpfile.js index c47b63a27..cbc28789e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -6,7 +6,6 @@ const path = require('path'), _ = require('underscore'), gutil = require('gulp-util'), grename = require('gulp-rename'), - createFile = require('fs'), del = require('del'), exec = require('child_process').exec, execFile = require('child_process').execFile, @@ -482,8 +481,8 @@ gulp.task('__env', function (cb) { gutil.log(gutil.colors.green('Creating System Constants...')); - createFile.writeFile( - pathEnviroment + 'constans.js', + fs.writeFile( + pathEnviroment + 'constants.js', content + '__env.USER_GUEST = ' + JSON.stringify(data.constants.userguest) + ';', cb );