gulpを使用してカスタムWordpressプラグイン用にSASSをコンパイルします。Gulp - 複数のフォルダを監視し、相対distフォルダに出力する
すべてのプラグインフォルダを共有し、同じフォルダ構造:
のwp-コンテンツ/プラグイン/ pluginname
資産
DIST -
SRC - SCSS
GULPのTASK
gulp.task('plugin-css',() => {
// Main SASS Style Sheet
const pluginSass = gulp.src(`wp-content/plugins/**/assets/src/*.scss`)
.pipe(plumber(plumberErrorHandler))
.pipe(sass());
// Merge the two streams and concatenate their contents into a single file
return merge(pluginSass)
.pipe(autoprefixer())
.pipe(cssmin())
.pipe(gulp.dest(function(file) {
return file.base;
}));
});
は、現在、私のコンパイルされたCSSファイルは、src SASSと同じフォルダに出力されています。私のコンパイル済みのSassを 'dist'フォルダに出力するにはどうしたらいいですか?
質問タイトルが間違っていると思います。 :) –
ああああ!ありがとう男 – James