1 | const lang = require('zero-lang');
|
2 | const path = require('path');
|
3 | const htmlhint = require('gulp-htmlhint');
|
4 | const gulp = require('gulp');
|
5 | const config = require('./config');
|
6 |
|
7 | lang.each(config.htmlhintDirs, (dir) => {
|
8 | gulp.task(
|
9 | `htmlhint-${dir}`, () => {
|
10 | const srcPath = path.resolve(__dirname, `../${dir}/**/*.html`);
|
11 | gulp.src(srcPath)
|
12 | .pipe(htmlhint());
|
13 | }
|
14 | );
|
15 | });
|
16 |
|
17 | gulp.task('htmlhint', lang.map(config.htmlhintDirs, (dir) => `htmlhint-${dir}`));
|