-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.js
39 lines (32 loc) · 895 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
/* global require, exports */
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const stylelint = require('gulp-stylelint');
const lintPathsJS = [
'static/js/*.js',
'gulpfile.js'
];
const lintPathsCSS = [
'static/css/*.css'
];
function lint_js() {
return gulp.src(lintPathsJS)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
}
function lint_css() {
return gulp.src(lintPathsCSS)
.pipe(stylelint({
reporters: [{ formatter: 'string', console: true}]
}));
}
function assets() {
const p = require('./package.json');
const assets = p.assets;
return gulp.src(assets, {cwd : 'node_modules/**'})
.pipe(gulp.dest('static/lib'));
}
exports.assets = assets;
exports.test = gulp.parallel(lint_css, lint_js);
exports.default = gulp.series(lint_css, lint_js, assets);