Skip to content

Commit 5fcf3f9

Browse files
committed
✨ dnt_monorepo 新增 packageManager 参数项
1 parent 2054128 commit 5fcf3f9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

denokit/src/dnt_monorepo.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from "node:fs";
22
import node_path from "node:path";
3-
import { build, emptyDir } from "@deno/dnt";
3+
import { build, BuildOptions, emptyDir } from "@deno/dnt";
44
import { iter_map_not_null } from "@gaubee/util/collections";
55
import { globToRegExp, isGlob } from "@std/path";
66
import { $ } from "@gaubee/nodekit/shell";
@@ -25,6 +25,8 @@ export const dntMonorepo = async (
2525
filter?: string | string[];
2626
/** 清空输出文件夹 */
2727
clean?: boolean;
28+
/** 构建使用的包管理器 */
29+
packageManager?: BuildOptions['packageManager']
2830
} = {},
2931
): Promise<void> => {
3032
const rootDir = normalizeFilePath(options.rootDir ?? Deno.cwd());
@@ -139,7 +141,7 @@ export const dntMonorepo = async (
139141
},
140142
importMap: import_map_file,
141143
typeCheck: false,
142-
packageManager: "pnpm",
144+
packageManager: options.packageManager,
143145
skipNpmInstall: true,
144146
package: {
145147
name: workspace.name,

dnt.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ if (import.meta.main) {
44
rootDir: import.meta.resolve("./"),
55
filter: Deno.args[0],
66
clean: Deno.args[0] === undefined,
7+
packageManager: "pnpm",
78
});
89
}

0 commit comments

Comments
 (0)