Browse Source

gulpfile: temporarily disable lint and enable watch

master
Guillermo Rauch 9 years ago
parent
commit
7bb90816a2
  1. 26
      gulpfile.js

26
gulpfile.js

@ -2,7 +2,6 @@ const gulp = require('gulp');
const del = require('del'); const del = require('del');
const ext = require('gulp-ext'); const ext = require('gulp-ext');
const babel = require('gulp-babel'); const babel = require('gulp-babel');
const eslint = require('gulp-eslint');
const uglify = require('gulp-uglify'); const uglify = require('gulp-uglify');
const help = require('gulp-task-listing'); const help = require('gulp-task-listing');
@ -13,7 +12,7 @@ gulp.task('compile', [
'compile-bin' 'compile-bin'
]); ]);
gulp.task('compile-lib', function () { gulp.task('compile-lib', () => {
return gulp.src('lib/**/*.js') return gulp.src('lib/**/*.js')
.pipe(babel({ .pipe(babel({
presets: ['es2015'], presets: ['es2015'],
@ -27,7 +26,7 @@ gulp.task('compile-lib', function () {
.pipe(gulp.dest('build/lib')); .pipe(gulp.dest('build/lib'));
}); });
gulp.task('compile-bin', function () { gulp.task('compile-bin', () => {
return gulp.src('bin/*') return gulp.src('bin/*')
.pipe(babel({ .pipe(babel({
presets: ['es2015'], presets: ['es2015'],
@ -42,19 +41,18 @@ gulp.task('compile-bin', function () {
.pipe(gulp.dest('build/bin')); .pipe(gulp.dest('build/bin'));
}); });
gulp.task('lint', function () { gulp.task('watch', ['watch-lib', 'watch-bin']);
return gulp.src([
'gulpfile.js', gulp.task('watch-lib', () => {
'lib/**/*.js', return gulp.watch('lib/*.js', ['compile-lib']);
'bin/*' });
])
.pipe(eslint()) gulp.task('watch-bin', () => {
.pipe(eslint.format()) return gulp.watch('bin/*', ['compile-bin']);
.pipe(eslint.failAfterError());
}); });
gulp.task('clean', function () { gulp.task('clean', () => {
return del(['build']); return del(['build']);
}); });
gulp.task('default', ['lint', 'compile']); gulp.task('default', ['watch']);

Loading…
Cancel
Save