recipe/packages/theme/gulpfile.js

21 lines
557 B
JavaScript
Raw Permalink Normal View History

2024-08-18 19:16:25 +08:00
import { dest, src } from "gulp";
import through from "through2";
const generateSass = () =>
src("src/client/**/*.scss")
.pipe(
through.obj((file, _encoding, callback) => {
const content = file.contents.toString();
if (!content.includes('@use "@sass-palette/hope-config";')) {
file.contents = Buffer.from(
`@use "@sass-palette/hope-config";\n${content}`,
);
}
callback(null, file);
}),
)
.pipe(dest("lib/bundle"));
export default generateSass;