UNPKG

newkit-cli

Version:

Newkit cli tools.

28 lines (25 loc) 701 B
'use strict'; let path = require('path'); let gulp = require('gulp'); let del = require('del'); let jshint = require('gulp-jshint'); let cwd = process.argv[4]; let root = (p, not) => { let tmpPath = path.join(cwd, p); if (not) { tmpPath = `!${tmpPath}`; } return tmpPath; }; let destPath = root('./dist/jshint-output.html'); gulp.task('jshint', () => { let module = process.argv[10]; return gulp.src([ root(`src/modules/${module}/**/*.js`), root(`src/modules/${module}/+(vendor*|libs*)/**`, true) ]).pipe(jshint('')) .pipe(jshint.reporter('gulp-jshint-html-reporter', { filename: destPath, createMissingFolders: true })); });