UNPKG

480 BJavaScriptView Raw
1const lang = require('zero-lang');
2const path = require('path');
3const htmlhint = require('gulp-htmlhint');
4const gulp = require('gulp');
5const config = require('./config');
6
7lang.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
17gulp.task('htmlhint', lang.map(config.htmlhintDirs, (dir) => `htmlhint-${dir}`));