Add a .transform feature
dcrockwell opened this issue · 0 comments
dcrockwell commented
Per suggestion by @Kdex:
// 1
stimpak.transform((stimpak, file, done) => {
file.contents = beautify(file.contents);
done(null, file);
});
// 2
stimpak.transform((stimpak, file, done) => {
file.contents = beautify(file.contents);
done(null, file);
});
stimpak.transform((stimpak, file, done) => {
file.stem = `_${file.stem}`;
done(null, file);
});
// 3
stimpak.transform((stimpak, file, done) => {
file.contents = beautify(file.contents);
done(null, file);
}).only("**/*", "/some/directory/name");
- make it so that each file has a chance to be transformed before writing.
- allow multiple transforms.
- allow transforms on files that match a provided glob