我是新來吞掉插件和我試圖讓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)' –