Skip to content

Commit 9dc9b71

Browse files
committed
build: updated package.json import
1 parent b151fd1 commit 9dc9b71

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

clone-packages.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
// @ts-check
2-
import fs from "fs-extra";
3-
import path from "path";
42
import { simpleGit } from "simple-git";
53
import pnpmExec from "@pnpm/exec";
6-
import docsGenData from "./docs-gen/data.json" assert { type: "json" };
7-
8-
const pnpm = pnpmExec;
4+
import { fileURLToPath } from "url";
5+
import fs from "fs-extra";
6+
import path from "path";
97

108
(async () => {
11-
const docsGenPath = path.resolve(path.join(".", "docs-gen")),
9+
const __filename = fileURLToPath(import.meta.url),
10+
__dirname = path.dirname(__filename),
11+
rootPkgPath = path.join(__dirname, "docs-gen", "data.json"),
12+
docsGenData = (await fs.readJson(rootPkgPath)),
13+
pnpm = pnpmExec,
14+
docsGenPath = path.resolve(path.join(".", "docs-gen")),
1215
tmpDocsGenPath = path.resolve(path.join(docsGenPath, "tmp"));
1316

1417
await fs.mkdir(tmpDocsGenPath);

0 commit comments

Comments
 (0)