From 6f9c4d66e314642750789e3567ea9940af7c1e6c Mon Sep 17 00:00:00 2001 From: hackyminer Date: Fri, 31 Aug 2018 06:49:58 +0900 Subject: [PATCH] customLess option added --- gulpfile.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index d44d7bf0fd..18a51980a2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -33,7 +33,7 @@ const Settings = require('./config.default.json'); // load custom settings try { let local = require('./config.json'); - _.extend(Settings, local); + _.merge(Settings, local); } catch (e) { if (e.code == 'MODULE_NOT_FOUND') { console.log('No config file found. Using default configuration...'); @@ -94,12 +94,20 @@ let less_destFolder_CX = dist_CX + 'css'; let less_destFile = 'etherwallet-master.css'; let less_destFileMin = 'etherwallet-master.min.css'; +// custom less file +if (configs['customLess']) { + let localLess = []; + localLess.push(less_srcFile); + localLess.push(app + 'styles/' + configs['customLess']); + less_srcFile = localLess; +} + gulp.task('styles', function() { return gulp.src(less_srcFile) .pipe(plumber({ errorHandler: onError })) .pipe(less({ compress: false })) .pipe(autoprefixer({ browsers: ['last 4 versions', 'iOS > 7'], remove: false })) - .pipe(rename(less_destFile)) + .pipe(concat(less_destFile)) // concat less files //.pipe( gulp.dest ( less_destFolder )) // unminified css //.pipe( gulp.dest ( less_destFolder_CX )) // unminified css .pipe(cssnano({ autoprefixer: false, safe: true }))