diff options
author | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-07 03:29:26 +0800 |
---|---|---|
committer | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-07 03:29:26 +0800 |
commit | bc73cbdbfeee2723415d68c69bd8cd3b5e4a7402 (patch) | |
tree | 9cf0f5c1e3e43e6ab7f8235752668d6e8ad1a3df /gulpfile.js | |
parent | 3f222854e439e0cf94242e32e54d9c36126d94d5 (diff) | |
download | tangerine-wallet-browser-bc73cbdbfeee2723415d68c69bd8cd3b5e4a7402.tar tangerine-wallet-browser-bc73cbdbfeee2723415d68c69bd8cd3b5e4a7402.tar.gz tangerine-wallet-browser-bc73cbdbfeee2723415d68c69bd8cd3b5e4a7402.tar.bz2 tangerine-wallet-browser-bc73cbdbfeee2723415d68c69bd8cd3b5e4a7402.tar.lz tangerine-wallet-browser-bc73cbdbfeee2723415d68c69bd8cd3b5e4a7402.tar.xz tangerine-wallet-browser-bc73cbdbfeee2723415d68c69bd8cd3b5e4a7402.tar.zst tangerine-wallet-browser-bc73cbdbfeee2723415d68c69bd8cd3b5e4a7402.zip |
Cleanup css and gulpfile post-migration
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/gulpfile.js b/gulpfile.js index 13760a7d0..126acccb8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -179,25 +179,15 @@ const jsFiles = [ 'popup', ] -// bundle tasks - -var jsDevStrings = jsFiles.map(jsFile => `dev:js:${jsFile}`) -var jsBuildStrings = jsFiles.map(jsFile => `build:js:${jsFile}`) - -jsFiles.forEach((jsFile) => { - gulp.task(`dev:js:${jsFile}`, bundleTask({ watch: true, label: jsFile, filename: `${jsFile}.js` })) - gulp.task(`build:js:${jsFile}`, bundleTask({ watch: false, label: jsFile, filename: `${jsFile}.js` })) -}) +// scss compilation and autoprefixing tasks -gulp.task('dev:js', gulp.parallel(...jsDevStrings)) -gulp.task('build:js', gulp.parallel(...jsBuildStrings)) gulp.task('build:scss', function () { return gulp.src('ui/app/css/index.scss') .pipe(sourcemaps.init()) .pipe(sass().on('error', sass.logError)) .pipe(sourcemaps.write()) .pipe(autoprefixer()) - .pipe(gulp.dest('ui/app/css/output')); + .pipe(gulp.dest('ui/app/css/output')) }); gulp.task('watch:scss', function () { return gulp.src('ui/app/css/index.scss') @@ -206,13 +196,21 @@ gulp.task('watch:scss', function () { .pipe(sass().on('error', sass.logError)) .pipe(sourcemaps.write()) .pipe(autoprefixer()) - .pipe(gulp.dest('ui/app/css/output')); + .pipe(gulp.dest('ui/app/css/output')) }); -gulp.task('copy:watch', function(){ - gulp.watch(['./app/{_locales,images}/*', './app/scripts/chromereload.js', './app/*.{html,json}'], gulp.series('copy')) +// bundle tasks + +var jsDevStrings = jsFiles.map(jsFile => `dev:js:${jsFile}`) +var jsBuildStrings = jsFiles.map(jsFile => `build:js:${jsFile}`) + +jsFiles.forEach((jsFile) => { + gulp.task(`dev:js:${jsFile}`, bundleTask({ watch: true, label: jsFile, filename: `${jsFile}.js` })) + gulp.task(`build:js:${jsFile}`, bundleTask({ watch: false, label: jsFile, filename: `${jsFile}.js` })) }) +gulp.task('dev:js', gulp.parallel(...jsDevStrings)) +gulp.task('build:js', gulp.parallel(...jsBuildStrings)) // disc bundle analyzer tasks |