-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
34 lines (29 loc) · 927 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
'use strict';
const gulp = require('gulp');
const gulpEslint = require('gulp-eslint');
const gulpHtmllint = require('gulp-html-lint');
const gulpStylelint = require('gulp-stylelint');
const jsdoc = require('gulp-jsdoc3');
gulp.task('lint-html', () => gulp.src(['./src/html/*.html'])
.pipe(gulpHtmllint({ htmllintrc : '.htmllintrc.json' }))
.pipe(gulpHtmllint.format())
);
gulp.task('lint-js', () => gulp.src(['gulpfile.js', './src/js/*.js'])
.pipe(gulpEslint({ configFile : '.eslintrc.json' }))
.pipe(gulpEslint.format())
);
gulp.task('lint-css', () => gulp.src(['./src/css/*.css'])
.pipe(gulpStylelint({
failAfterError : false,
reporters : [
{
formatter : 'string',
console : true
}
]
}))
);
const jsdocsConfig = require('./jsdoc.json');
gulp.task('docs', () => gulp.src(['CHANGELOG.md', 'README.md', './src/js/*.js'], { read : false })
.pipe(jsdoc(jsdocsConfig))
);