1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 17:33:23 +01:00

Clean up gulpfile

This commit is contained in:
sdtsui 2017-08-06 13:44:50 -07:00
parent bd9549bddc
commit aeaf917cbb

View File

@ -148,9 +148,6 @@ gulp.task('copy', gulp.series(gulp.parallel(...copyStrings), 'manifest:productio
gulp.task('copy:watch', function(){
gulp.watch(['./app/{_locales,images}/*', './app/scripts/chromereload.js', './app/*.{html,json}'], gulp.series('copy'))
})
gulp.task('watch:style', function(){
gulp.watch(['ui/app/css/**/*.scss'], gulp.series(['build:scss']))
});
// lint js
@ -164,13 +161,7 @@ gulp.task('lint', function () {
// To have the process exit with an error code (1) on
// lint error, return the stream and pipe to failAfterError last.
.pipe(eslint.failAfterError())
});
/*
gulp.task('default', ['lint'], function () {
// This will only run if the lint task is successful...
});
*/
})
// build js
@ -191,16 +182,10 @@ gulp.task('build:scss', function () {
.pipe(sourcemaps.write())
.pipe(autoprefixer())
.pipe(gulp.dest('ui/app/css/output'))
});
gulp.task('watch:scss', function () {
return gulp.src('ui/app/css/index.scss')
// .pipe(watch('ui/app/css/**/*.scss'))
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.write())
.pipe(autoprefixer())
.pipe(gulp.dest('ui/app/css/output'))
});
})
gulp.task('watch:scss', function(){
gulp.watch(['ui/app/css/**/*.scss'], gulp.series(['build:scss']))
})
// bundle tasks
@ -240,7 +225,7 @@ gulp.task('zip', gulp.parallel('zip:chrome', 'zip:firefox', 'zip:edge', 'zip:ope
// high level tasks
gulp.task('dev', gulp.series('build:scss', 'dev:js', 'copy', gulp.parallel('watch:style', 'copy:watch', 'dev:reload')))
gulp.task('dev', gulp.series('build:scss', 'dev:js', 'copy', gulp.parallel('watch:scss', 'copy:watch', 'dev:reload')))
gulp.task('build', gulp.series('clean', 'build:scss', gulp.parallel('build:js', 'copy')))
gulp.task('dist', gulp.series('build', 'zip'))
@ -270,7 +255,7 @@ function zipTask(target) {
return () => {
return gulp.src(`dist/${target}/**`)
.pipe(zip(`metamask-${target}-${manifest.version}.zip`))
.pipe(gulp.dest('builds'));
.pipe(gulp.dest('builds'))
}
}