如何向gulp stream添加乙烯基实例?
我想将一个如何向gulp stream添加乙烯基实例?,gulp,Gulp,我想将一个新的乙烯基文件添加到吞咽任务流中 function task_add_vinyl_file(cb){ const file = new Vinyl({ cwd: '/', base: '/test/', path: '/test/file.js', contents: Buffer.from('var x = 123') }); return gulp.src( [
新的乙烯基
文件添加到吞咽任务流中
function task_add_vinyl_file(cb){
const file = new Vinyl({
cwd: '/',
base: '/test/',
path: '/test/file.js',
contents: Buffer.from('var x = 123')
});
return gulp.src(
[
'path/to/files/**'
])
.pipe(file)
.pipe(gulp.dest('.'))
}
问题是文件
与.pipe()不兼容
如何将乙烯基实例添加到gulp管道