【发布时间】:2017-09-28 23:10:56
【问题描述】:
我需要使用 Gulp 输出原始 CSS 和生成的 RTL 版本的缩小版本。但是,由于这些 CSS 最初是从 SASS 编译的,因此我还希望尽可能保留源映射。
这是在缩小之前使用gulp-rtlcss 的任务:
gulp.task("sass", function() {
return gulp.src("scss/style.scss")
.pipe(sourcemaps.init())
// sass and autoprefixer here
.pipe(gulp.dest("css"))
.pipe(rtlcss())
.pipe(rename({ suffix: "-rtl" }))
.pipe(gulp.dest("css"))
});
这些代码输出:
style.css
style-rtl.css
我想要实现的是输出两者的缩小版,
style.min.css
style-rtl.min.css
我怀疑这只能在一个流中完成。有什么想法吗?
【问题讨论】: