FBI-2182
Web Entry 2.0 User field Improvements request
This commit is contained in:
committed by
davidcallizaya
parent
bdf7faa1f0
commit
0d294b0da7
15
Rakefile
15
Rakefile
@@ -1,5 +1,5 @@
|
||||
require 'rubygems'
|
||||
|
||||
require 'json'
|
||||
desc "Default Task - Build Library"
|
||||
task :default => [:required] do
|
||||
Rake::Task['build'].execute
|
||||
@@ -53,6 +53,7 @@ task :build => [:required] do
|
||||
mafeDir = targetDir + "/mafe"
|
||||
pmdynaformDir = targetDir + "/pmdynaform"
|
||||
|
||||
generateEnviromentVariables
|
||||
prepareDirs([targetDir, pmUIDir, mafeDir, pmdynaformDir, jsTargetDir, cssTargetDir, cssImagesTargetDir, imgTargetDir, pmUIFontsDir])
|
||||
|
||||
buildPmUi(Dir.pwd + "/vendor/colosa/pmUI", targetDir, mode)
|
||||
@@ -134,6 +135,18 @@ task :build => [:required] do
|
||||
#task argv1.to_sym do ; end
|
||||
end
|
||||
|
||||
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'])
|
||||
dir = "vendor/colosa/MichelangeloFE/src/enviroment/"
|
||||
File.open(dir +'constans.js', 'w') { |fileWrite|
|
||||
fileWrite.write content + ';'
|
||||
}
|
||||
end
|
||||
|
||||
def buildPmUi(homeDir, targetDir, mode)
|
||||
puts "\nBuilding PMUI library".green.bold
|
||||
|
||||
|
||||
@@ -477,13 +477,13 @@ gulp.task('clean', function () {
|
||||
*/
|
||||
gulp.task('__env', function (cb) {
|
||||
var data = require('./config/enviromentvariables.json'),
|
||||
pathEnviroment = 'vendor/colosa/MichelangeloFE/src/enviromentVariables/',
|
||||
pathEnviroment = 'vendor/colosa/MichelangeloFE/src/enviroment/',
|
||||
content = 'var __env = __env || {};';
|
||||
|
||||
gutil.log(gutil.colors.green('Creating guest user constants...'));
|
||||
gutil.log(gutil.colors.green('Creating System Constants...'));
|
||||
|
||||
createFile.writeFile(
|
||||
pathEnviroment + 'enviromentVariables.js',
|
||||
pathEnviroment + 'constans.js',
|
||||
content + '__env.USER_GUEST = ' + JSON.stringify(data.constants.userguest) + ';',
|
||||
cb
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user