Answer the question
In order to leave comments, you need to log in
Gulp: Why doesn't a file have an extname property in stream?
I watch screencasts by I. Kantor on Gulp. Why don't I have it in the screencast, in the stream, the file doesn't have an extname?
Here is gulpfile.js code:
'use strict';
var gulp = require('gulp');
gulp.task('default', function() {
return gulp.src('source/**/*.*').
on('data', function(file) {
console.dir(file.extname);
})
});
gulp.task('default', function() {
return gulp.src('source/**/*.*').pipe(gulp.dest(function(file) {
console.dir(file.extname);
return 'dest';
}));
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question