create-cactus 1.0.0 → 1.0.1
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/index.js +31 -31
- package/package.json +1 -2
package/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import fs from 'fs-extra';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
|
|
7
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
const templateDir = path.join(__dirname, 'template');
|
|
9
|
-
|
|
10
|
-
let projectName = process.argv[2];
|
|
11
|
-
|
|
12
|
-
if (!projectName) {
|
|
13
|
-
projectName = 'my-stock-system';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
console.log(`🚀 Creating Cactus Stock Management System...`);
|
|
17
|
-
console.log(`📁 Project: ${projectName}\n`);
|
|
18
|
-
|
|
19
|
-
const targetDir = path.join(process.cwd(), projectName);
|
|
20
|
-
|
|
21
|
-
if (fs.existsSync(targetDir)) {
|
|
22
|
-
console.error(`❌ Error: Folder "${projectName}" already exists!`);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
fs.copySync(templateDir, targetDir);
|
|
27
|
-
|
|
28
|
-
console.log(`✅ Success! Project created successfully.\n`);
|
|
29
|
-
console.log(`📌 Next: cd ${projectName}`);
|
|
30
|
-
console.log(`Then install dependencies in both backend-project and frontend-project.`);
|
|
31
|
-
console.log(`🎉 Happy Coding with Cactus!`);
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const templateDir = path.join(__dirname, 'template');
|
|
9
|
+
|
|
10
|
+
let projectName = process.argv[2];
|
|
11
|
+
|
|
12
|
+
if (!projectName) {
|
|
13
|
+
projectName = 'my-stock-system';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
console.log(`🚀 Creating Cactus Stock Management System...`);
|
|
17
|
+
console.log(`📁 Project: ${projectName}\n`);
|
|
18
|
+
|
|
19
|
+
const targetDir = path.join(process.cwd(), projectName);
|
|
20
|
+
|
|
21
|
+
if (fs.existsSync(targetDir)) {
|
|
22
|
+
console.error(`❌ Error: Folder "${projectName}" already exists!`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
fs.copySync(templateDir, targetDir);
|
|
27
|
+
|
|
28
|
+
console.log(`✅ Success! Project created successfully.\n`);
|
|
29
|
+
console.log(`📌 Next: cd ${projectName}`);
|
|
30
|
+
console.log(`Then install dependencies in both backend-project and frontend-project.`);
|
|
31
|
+
console.log(`🎉 Happy Coding with Cactus!`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cactus",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Create a new Stock Management System (Cactus)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -22,5 +22,4 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"fs-extra": "^11.3.5"
|
|
24
24
|
}
|
|
25
|
-
|
|
26
25
|
}
|