我是新来吞掉插件和我试图让sourcemaps工作一饮而尽sourcemaps产生最后SCSS文件只
文件结构
css/
sass/
theme/
_some-style.scss
_some-style-2.scss
_some-style-3.scss
style.scss
style.css
style.css.map
在我style.scss文件我有
@import "theme/some-style";
@import "theme/some-style-2";
@import "theme/some-style-3";
伟大的,所以我只是越来越,_some-style-3.scss出现在我的开发工具,当我检查。我知道我有一个路径问题,但不知道如何解决它。
咕嘟咕嘟文件:
gulp.task('sass', function() {
return gulp.src(css/sass/theme/**/*.scss)
.pipe(sourcemaps.init())
.pipe(sass.sync().on('error', sass.logError))
.pipe(sourcemaps.write())
.pipe(gulp.dest(css));
});
哇,是啊,我写这个时很累。它应该更新以代表我现在实际拥有的。 – user4447826
如果您已经将其他文件导入到style.scss中,那么您只需要在gulp.src中指定该文件即可。像这样:'return gulp.src(css/sass/style.scss)' –