I edit my "index" task with custom transform function
however when i run gulp serve i see only hello world1
why is hello world2 isn't print.
gulp.task('index', function() {
var target = gulp.src('./public/index.html');
var sources = gulp.src(config.appjs.concat(config.appcss), { read: false });
gutil.log('Hello world1!');
return target.pipe(inject(sources), {
starttag: '// inject:js',
endtag: '// endinject',
transform: function(filepath, file, i, length) {
gutil.log('Hello world2!');
var n = str.indexOf("/");
if (n > -1) return filepath.substr(n,
filepath.length());
return filepath;
}
})
.pipe(wiredep({}))
.pipe(gulp.dest('./dev'))
.pipe(browserSync.stream());
});
Aucun commentaire:
Enregistrer un commentaire