create-pnpm-cli 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +5 -4
- package/package.json +1 -1
- package/template/{pnpm-monorepo → pnpm-typescript-monorepo}/package.json +4 -1
- /package/template/{pnpm-monorepo → pnpm-typescript-monorepo}/README.md +0 -0
- /package/template/{pnpm-monorepo → pnpm-typescript-monorepo}/apps/examples/package.json +0 -0
- /package/template/{pnpm-monorepo → pnpm-typescript-monorepo}/packages/name/bin/bin.js +0 -0
- /package/template/{pnpm-monorepo → pnpm-typescript-monorepo}/packages/name/package.json +0 -0
- /package/template/{pnpm-monorepo → pnpm-typescript-monorepo}/pnpm-workspace.yaml +0 -0
- /package/template/{pnpm-monorepo → pnpm-typescript-monorepo}/prettier.config.cjs +0 -0
package/lib/cli.js
CHANGED
|
@@ -38,7 +38,7 @@ import packageManagerInstall from "package-manager-install";
|
|
|
38
38
|
import path3 from "path";
|
|
39
39
|
var cli = program;
|
|
40
40
|
cli.name("create-pnpm-cli").version(version);
|
|
41
|
-
cli.command("create", { isDefault: true }).description("create pnpm cli").action(async () => {
|
|
41
|
+
cli.command("create", { isDefault: true }).description("create pnpm cli").argument("[path]", "path to mkdir", "./").action(async (targetPath) => {
|
|
42
42
|
const names = await glob(`**`, {
|
|
43
43
|
deep: 1,
|
|
44
44
|
cwd: TEMPLATE_PATH,
|
|
@@ -52,9 +52,10 @@ cli.command("create", { isDefault: true }).description("create pnpm cli").action
|
|
|
52
52
|
message: "\u8BF7\u8F93\u5165\u5305\u540D",
|
|
53
53
|
default: template
|
|
54
54
|
});
|
|
55
|
-
|
|
56
|
-
fse.
|
|
57
|
-
|
|
55
|
+
const target = path3.join(targetPath, name);
|
|
56
|
+
await fse.ensureDir(target).catch((err) => handleError(err, "\u6587\u4EF6\u5939\u4E0D\u5B58\u5728"));
|
|
57
|
+
await fse.copy(path3.join(TEMPLATE_PATH, template), target).catch((err) => handleError(err, "\u62F7\u8D1D\u6587\u4EF6\u9519\u8BEF"));
|
|
58
|
+
await packageManagerInstall({ cwd: target });
|
|
58
59
|
});
|
|
59
60
|
cli.parse();
|
|
60
61
|
export {
|
package/package.json
CHANGED
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
"build": "pnpm --recursive --filter=./packages/** build"
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@
|
|
7
|
+
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
8
|
+
"@types/node": "^20.10.5",
|
|
9
|
+
"prettier": "^3.2.4",
|
|
10
|
+
"typescript": "^5.2.2"
|
|
8
11
|
},
|
|
9
12
|
"keywords": [],
|
|
10
13
|
"author": "",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|