Skip to content

Commit ded3dbf

Browse files
committed
ぜんぶawaitする
1 parent 26aa0e2 commit ded3dbf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/removeHinting.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if (existsSync(outPath)) {
3535
deflate: (data) => Array.from(pako.deflate(Uint8Array.from(data))),
3636
}) as Buffer;
3737
const outFileName = path.parse(file).name + `-nohint.woff`;
38-
writeFile(path.join(outPath, outFileName), woffBuffer).then(() => {
38+
await writeFile(path.join(outPath, outFileName), woffBuffer).then(() => {
3939
console.log(`Processed ${file} -> ${outFileName}`);
4040
});
4141

@@ -45,7 +45,7 @@ if (existsSync(outPath)) {
4545
kerning: true,
4646
}) as Buffer;
4747
const outFileName2 = path.parse(file).name + `-nohint.woff2`;
48-
writeFile(path.join(outPath, outFileName2), woff2Buffer).then(() => {
48+
await writeFile(path.join(outPath, outFileName2), woff2Buffer).then(() => {
4949
console.log(`Processed ${file} -> ${outFileName2}`);
5050
});
5151
}
@@ -77,7 +77,7 @@ if (existsSync(outPath)) {
7777
path.extname(file) === ".css" &&
7878
weights.some((w) => file.includes(w.toString()))
7979
) {
80-
rewriteCSS(file);
80+
await rewriteCSS(file);
8181
}
8282
}
8383
}

0 commit comments

Comments
 (0)