【发布时间】:2020-03-10 09:13:21
【问题描述】:
请帮助我进行 Gulp 配置
我有两个 src scss 文件夹:
styles1/
styles2/
在每个文件夹中,我都有不同网站页面的下一个结构:
styles1/front_page/front.page.scss - root file for front page
styles1/front_page/sections/ - front page sections that are impoted in root file(front.page.scss)
我的 gulp 任务如下所示:
gulp.task('sass-dev', function(done) {
return gulp.src(['src/scss/**/*.page.scss'])
.pipe(sass({outputStyle:'expanded'}).on('error',sass.logError))
.pipe(gulp.dest('./frontend/css/temp/'))
});
通过这种方式,我得到带有下一个路径的输出文件:
./frontend/css/temp/styles1/front_page/front.page.css
但我需要
./frontend/css/temp/styles1/front.page.css
更多预期结果示例:
./frontend/css/temp/styles1/about.page.css
./frontend/css/temp/styles1/contact.page.css
./frontend/css/temp/styles2/front.page.css
./frontend/css/temp/styles2/profile.page.css
可以这样配置输出吗?
谢谢!
【问题讨论】: