diff --git a/lib/hash.ts b/lib/hash.ts index 2dae20a..f177171 100644 --- a/lib/hash.ts +++ b/lib/hash.ts @@ -13,8 +13,7 @@ export default function (manifestName: string) { const mappings: { [path: string]: string } = {}; return new Transform({ - readableObjectMode: true, - writableObjectMode: true, + objectMode: true, transform(chunk: File, _, callback) { const hash = PRODUCTION ? fileHash(chunk.contents as Buffer) : "00000000"; const newName = `${chunk.basename.substring(0, chunk.basename.length - chunk.extname.length)}.${hash.substring(0, 8)}${chunk.extname}`; diff --git a/lib/tasks/articles.ts b/lib/tasks/articles.ts index 5338f11..666e44b 100644 --- a/lib/tasks/articles.ts +++ b/lib/tasks/articles.ts @@ -62,8 +62,7 @@ function renderArticle() { reloadAssets(); return new Transform({ - readableObjectMode: true, - writableObjectMode: true, + objectMode: true, async transform(file: File, _, callback) { try { const slug = basename(file.path, ".asciidoc"); diff --git a/lib/tasks/fonts.ts b/lib/tasks/fonts.ts index 814f8a5..203023b 100644 --- a/lib/tasks/fonts.ts +++ b/lib/tasks/fonts.ts @@ -13,8 +13,7 @@ const FONT_PRESETS = { function compileFont() { return new Transform({ - readableObjectMode: true, - writableObjectMode: true, + objectMode: true, async transform(chunk: File, _, callback) { const [, variant, weight] = /([A-Z][a-z]+)-(\w+)\.ttf$/.exec(chunk.basename); const tmpOutput = tmp.fileSync({ discardDescriptor: true });