create-zhx-monorepo 0.1.0 → 0.1.2
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/bin/index.js
CHANGED
|
@@ -10,13 +10,22 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
10
10
|
const __dirname = path.dirname(__filename);
|
|
11
11
|
|
|
12
12
|
async function main() {
|
|
13
|
-
|
|
13
|
+
let targetDir = process.argv[2];
|
|
14
14
|
|
|
15
15
|
if (!targetDir) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const response = await prompts({
|
|
17
|
+
type: "text",
|
|
18
|
+
name: "targetDir",
|
|
19
|
+
message: "Project name:",
|
|
20
|
+
validate: (value) => (value ? true : "Project name cannot be empty"),
|
|
21
|
+
});
|
|
22
|
+
targetDir = response.targetDir;
|
|
23
|
+
|
|
24
|
+
if (!targetDir) {
|
|
25
|
+
console.log(red("❌ No project name provided."));
|
|
26
|
+
console.log(red("Exiting..."));
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
20
29
|
}
|
|
21
30
|
|
|
22
31
|
const projectPath = path.resolve(process.cwd(), targetDir);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-zhx-monorepo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Create a ZHX monorepo with one command",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-zhx-monorepo": "bin/index.js"
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
"prompts": "^2.4.2",
|
|
16
16
|
"kolorist": "^1.8.0"
|
|
17
17
|
}
|
|
18
|
-
}
|
|
18
|
+
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@interceptors/*": ["src/lib/interceptors/*"],
|
|
14
14
|
"@pipes/*": ["src/lib/pipes/*"],
|
|
15
15
|
"@schemas/*": ["src/lib/schemas/*"],
|
|
16
|
-
"@templates/*": ["templates/*"],
|
|
16
|
+
"@templates/*": ["src/lib/templates/*"],
|
|
17
17
|
"@utils/*": ["src/lib/utils/*"],
|
|
18
18
|
"@generated/prisma": ["./prisma/generated/client"]
|
|
19
19
|
}
|
/package/templates/monorepo-starter/server/{templates → src/lib/templates}/notification.templates.ts
RENAMED
|
File without changes
|