Skip to content

Commit

Permalink
refactor: use fs.mkdir instead of mkdirp
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 17, 2023
1 parent 2a913fc commit 6ee6384
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import fsp from "node:fs/promises";
import { promisify } from "node:util";
import { readdirSync, statSync } from "node:fs";
import { dirname, resolve } from "pathe";
import mkdirp from "mkdirp";
import jiti from "jiti";
import consola from "consola";
import type { PackageJson } from "pkg-types";
import { autoPreset } from "./auto";
import type { BuildPreset, BuildConfig, BuildContext } from "./types";

export async function ensuredir(path: string) {
await mkdirp(dirname(path));
await fsp.mkdir(dirname(path), { recursive: true });
}

export function warn(ctx: BuildContext, message: string) {
Expand Down

0 comments on commit 6ee6384

Please sign in to comment.