-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
gulpfile.js
29 lines (25 loc) · 707 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
'use strict';
var path = require('path');
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var excludeGitignore = require('gulp-exclude-gitignore');
var nsp = require('gulp-nsp');
function staticFiles() {
return gulp.src('**/*.js')
.pipe(excludeGitignore())
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
}
// Watch files
function watchFiles() {
gulp.watch(['generators/**/*.js']);
}
const build = gulp.series(staticFiles);
const watch = gulp.parallel(watchFiles);
// const prepublish = gulp.series(prepublishCb);
// Export tasks
// exports.prepublish = prepublish;
exports.build = build;
exports.watch = watch;
exports.default = staticFiles;