diff --git a/Rakefile b/Rakefile index ca5f47cd6..7f75a4613 100644 --- a/Rakefile +++ b/Rakefile @@ -142,6 +142,8 @@ def generateEnviromentVariables() dataUser = JSON.parse(file) content = content + "__env.USER_GUEST = " + JSON.generate(dataUser['constants']['userguest']) dir = "vendor/colosa/MichelangeloFE/src/enviroment/" + # create a directory enviroment + Dir.mkdir dir File.open(dir +'constants.js', 'w') { |fileWrite| fileWrite.write content + ';' } diff --git a/gulpfile.js b/gulpfile.js index cbc28789e..2ecbb281b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -480,7 +480,9 @@ gulp.task('__env', function (cb) { content = 'var __env = __env || {};'; gutil.log(gutil.colors.green('Creating System Constants...')); - + if (!fs.existsSync(pathEnviroment)){ + fs.mkdirSync(pathEnviroment); + } fs.writeFile( pathEnviroment + 'constants.js', content + '__env.USER_GUEST = ' + JSON.stringify(data.constants.userguest) + ';',