-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
41 lines (33 loc) · 911 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
'use strict';
var gulp = require('gulp');
var config = require('./gulp-config');
var helper = {
plugins: {},
getPlugin: function (name) {
var plugin = this.plugins[name];
if (!plugin) {
plugin = require(name);
this.plugins[name] = plugin;
}
return plugin;
}
};
gulp.task('default', ['build'], function () {
});
gulp.task('build', ['clean', 'eslint'], function () {
});
gulp.task('clean', function (done) {
var del = helper.getPlugin('del');
del(['coverage', 'tmp'], function (err) {
done(err);
});
});
gulp.task('eslint', function () {
var eslint = helper.getPlugin('gulp-eslint');
return gulp.src(['index.js', 'gulpfile.js', 'make', 'common-services/**/*.js'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failOnError());
});
gulp.task('dist', [ 'build' ], function () {
});