我正在使用带有 PostCSS 的 Ruby sass。这是我的 gulp css 任务。
gulp.task('css', function () {
var processors = [
short,
rucksack,
postcssmodules
];
return gulp.src('./css/src/*.scss')
.pipe(postcss(processors, {syntax: scss}))
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./dest'));
});
我得到的错误
➜ website git:(master) ✗ gulp css
[09:52:08] Using gulpfile ~/my-projects/website/gulpfile.js
[09:52:08] Starting 'css'...
[09:52:08] 'css' errored after 12 ms
[09:52:08] Error: must provide pattern
at new GlobSync (/Users/jitendravyas/my-projects/website/node_modules/glob/sync.js:29:11)
at Function.globSync [as sync] (/Users/jitendravyas/my-projects/website/node_modules/glob/sync.js:24:10)
at /Users/jitendravyas/my-projects/website/node_modules/gulp-ruby-sass/index.js:68:21
at Array.forEach (native)
at gulpRubySass (/Users/jitendravyas/my-projects/website/node_modules/gulp-ruby-sass/index.js:67:10)
at /Users/jitendravyas/my-projects/website/gulpfile.js:48:15
at taskWrapper (/Users/jitendravyas/my-projects/website/node_modules/undertaker/lib/set-task.js:13:15)
at bound (domain.js:287:14)
at runBound (domain.js:300:12)
at asyncRunner (/Users/jitendravyas/my-projects/website/node_modules/async-done/index.js:36:18)