Reputation: 40464
How does one acquire the filename of the file being passed in gulp-jshint?
Upvotes: 3
Views: 2521
Reputation: 18055
gulp-tap would help you print the names of files being used from gulp-src...
var gulp = require('gulp');
var path = require('path');
var tap = require('gulp-tap');
gulp.task('examples', function() {
return gulp.src('./examples/*.html')
.pipe(tap(function (file,t) {
console.log(path.basename(file.path));
// Do something with the file name
}))
.pipe(gulp.dest('./build'));
});
Upvotes: 3