我使用for
,但这不对。
gulp.task('themes', function() {
for (var color in config.themes) {
for (var shine in config.shines) {
gulp.src(['src/scss/_config.scss'])
.pipe(rename('_' + config.themes[color] + '-' + config.shines[shine] + '.scss'))
.pipe(gulp.dest('src/scss/themes'));
}
}
});
我怎么能用流?
答案 0 :(得分:0)
只需使用多个管道gulp.dest()函数:
gulp.task('themes', function() {
for (var color in config.themes) {
for (var shine in config.shines) {
gulp.src(['src/scss/_config.scss'])
.pipe(rename('_' + config.themes[color] + '-' + config.shines[shine] + '.scss'))
.pipe(gulp.dest('src/scss/themes'));
.pipe(gulp.dest('src/scss/themes2'));
}
}
});'src/scss/themes'));