Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Commit

Permalink
customLess option added
Browse files Browse the repository at this point in the history
  • Loading branch information
hackmod committed Aug 31, 2018
1 parent c91e7fe commit 6f9c4d6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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...');
Expand Down Expand Up @@ -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 }))
Expand Down

0 comments on commit 6f9c4d6

Please sign in to comment.