Skip to content

Commit 9113580

Browse files
committed
remove mkdir dist
1 parent 6601fe0 commit 9113580

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

html.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { readFile, mkdir, writeFile } from 'fs/promises';
2-
import { dirname } from 'path';
3-
import { constants } from 'fs';
1+
import { readFile, writeFile } from 'fs/promises';
42

53
export default function html(options = {}) {
64
return {
@@ -22,13 +20,6 @@ export default function html(options = {}) {
2220
.replace('</body>', () => `<script>\n${js.text}</script>\n</body>`);
2321
}
2422

25-
const dirpath = dirname(options.out);
26-
try {
27-
await access(dirpath, constants.R_OK | constants.W_OK);
28-
} catch {
29-
mkdir(dirpath);
30-
}
31-
3223
await writeFile(options.out, html, { encoding: 'utf8' });
3324
});
3425
},

0 commit comments

Comments
 (0)