forked from AustinBratcher/shipengine-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
50 lines (39 loc) · 997 Bytes
/
gulpfile.js
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
39
40
41
42
43
44
45
46
47
48
49
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var babel = require('gulp-babel');
var jasmine = require('gulp-jasmine');
var del = require('del');
var paths = {
src : 'src/**/*.js',
dest: 'dist'
};
gulp.task('default', ['lint'], () => {
console.log('Gulp is running');
// gulp.start('test');
gulp.start('babel');
});
gulp.task('clean', () => {
return del([paths.dest+'/**/*.js']);
});
gulp.task('watch', () => {
gulp.watch(paths.src, ['default']);
})
// Clean up source code
gulp.task('lint', () => {
return gulp.src(paths.src)
.pipe(eslint({
useEslintrc: true,
configFile: './.eslintrc',
fix: true
}))
.pipe(eslint.format())
.pipe(eslint.failAfterError())
});
// Transpile source for distribution
gulp.task('babel', ['clean'], () => {
gulp.src(paths.src)
.pipe(babel())
.pipe(gulp.dest(paths.dest));
});
gulp.task('test', () => {
});