create-deesse-app 0.0.6 → 0.0.7
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 +48 -62
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -1,63 +1,49 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import prompts from "prompts";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
type: "text",
|
|
10
|
-
name: "
|
|
11
|
-
message: "
|
|
12
|
-
initial: "
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (
|
|
17
|
-
console.
|
|
18
|
-
process.exit(
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
console.log("
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
✅ Project ready!
|
|
50
|
-
|
|
51
|
-
Next steps:
|
|
52
|
-
cd ${projectName}
|
|
53
|
-
cp .env.example .env
|
|
54
|
-
pnpm dev
|
|
55
|
-
|
|
56
|
-
👉 Admin available at http://localhost:3000/admin
|
|
57
|
-
`);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
main().catch((err) => {
|
|
61
|
-
console.error("❌ Error:", err);
|
|
62
|
-
process.exit(1);
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import prompts from "prompts";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
async function main() {
|
|
6
|
+
console.log("Create Deesse App · initial setup");
|
|
7
|
+
|
|
8
|
+
const { appPath } = await prompts({
|
|
9
|
+
type: "text",
|
|
10
|
+
name: "appPath",
|
|
11
|
+
message: "App name (relative path, '.' for current dir):",
|
|
12
|
+
initial: ".",
|
|
13
|
+
validate: (val) => (typeof val === "string" && val.trim().length > 0 ? true : "Please provide a valid path"),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
if (appPath === undefined) {
|
|
17
|
+
console.log("Operation cancelled.");
|
|
18
|
+
process.exit(0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const resolvedPath = path.resolve(process.cwd(), String(appPath).trim());
|
|
22
|
+
|
|
23
|
+
const { template } = await prompts({
|
|
24
|
+
type: "select",
|
|
25
|
+
name: "template",
|
|
26
|
+
message: "Choose a template:",
|
|
27
|
+
choices: [
|
|
28
|
+
{ title: "base", value: "base" },
|
|
29
|
+
{ title: "docs", value: "docs" },
|
|
30
|
+
{ title: "saas", value: "saas" },
|
|
31
|
+
],
|
|
32
|
+
initial: 0,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
if (template === undefined) {
|
|
36
|
+
console.log("Operation cancelled.");
|
|
37
|
+
process.exit(0);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
console.log("\nProject preparation (simulation):");
|
|
41
|
+
console.log("- Destination:", resolvedPath);
|
|
42
|
+
console.log("- Template:", template);
|
|
43
|
+
console.log("\nNo action performed yet. Next step: implement template copy.");
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
main().catch((err) => {
|
|
47
|
+
console.error("Error:", err);
|
|
48
|
+
process.exit(1);
|
|
63
49
|
});
|