forked from amir20/phantomjs-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.babel.js
More file actions
38 lines (30 loc) · 862 Bytes
/
gulpfile.babel.js
File metadata and controls
38 lines (30 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import gulp from "gulp";
import babel from "gulp-babel";
import jasmine from "gulp-jasmine";
import eslint from "gulp-eslint";
import del from "del";
gulp.task('clean', () => del(['lib/']));
gulp.task('lint', () => {
return gulp.src('src/**/*.js')
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('build', ['clean'], () => {
return gulp.src('src/**.js')
.pipe(babel())
.pipe(gulp.dest('lib'));
});
gulp.task('build:test', ['build'], () => {
return gulp.src('src/spec/**.js')
.pipe(babel())
.pipe(gulp.dest('lib/spec'));
});
gulp.task('test', ['build:test'], () => {
return gulp.src('lib/spec/*_spec.js')
.pipe(jasmine());
});
gulp.task('watch', () => {
gulp.watch('src/**/*.js', ['build']);
});
gulp.task('default', ['lint', 'test']);