create-nextspark-app 0.1.0-beta.5 → 0.1.0-beta.6
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/dist/index.js +4 -33
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -32,15 +32,15 @@ async function createProject(options) {
|
|
|
32
32
|
};
|
|
33
33
|
await fs.writeJson(path.join(projectPath, "package.json"), packageJson, { spaces: 2 });
|
|
34
34
|
pkgSpinner.succeed(" package.json created");
|
|
35
|
-
const cliSpinner = ora(" Installing @nextsparkjs/cli...").start();
|
|
35
|
+
const cliSpinner = ora(" Installing @nextsparkjs/core and @nextsparkjs/cli...").start();
|
|
36
36
|
try {
|
|
37
|
-
execSync("pnpm add @nextsparkjs/cli", {
|
|
37
|
+
execSync("pnpm add @nextsparkjs/core @nextsparkjs/cli", {
|
|
38
38
|
cwd: projectPath,
|
|
39
39
|
stdio: "pipe"
|
|
40
40
|
});
|
|
41
|
-
cliSpinner.succeed(" @nextsparkjs/cli installed");
|
|
41
|
+
cliSpinner.succeed(" @nextsparkjs/core and @nextsparkjs/cli installed");
|
|
42
42
|
} catch (error) {
|
|
43
|
-
cliSpinner.fail(" Failed to install @nextsparkjs/cli");
|
|
43
|
+
cliSpinner.fail(" Failed to install @nextsparkjs/core and @nextsparkjs/cli");
|
|
44
44
|
throw error;
|
|
45
45
|
}
|
|
46
46
|
console.log();
|
|
@@ -76,17 +76,6 @@ async function createProject(options) {
|
|
|
76
76
|
if (result.status !== 0) {
|
|
77
77
|
throw new Error(`Wizard failed with exit code ${result.status}`);
|
|
78
78
|
}
|
|
79
|
-
const installSpinner = ora(" Installing dependencies...").start();
|
|
80
|
-
try {
|
|
81
|
-
execSync("pnpm install", {
|
|
82
|
-
cwd: projectPath,
|
|
83
|
-
stdio: "pipe"
|
|
84
|
-
});
|
|
85
|
-
installSpinner.succeed(" Dependencies installed");
|
|
86
|
-
} catch (error) {
|
|
87
|
-
installSpinner.fail(" Failed to install dependencies");
|
|
88
|
-
throw error;
|
|
89
|
-
}
|
|
90
79
|
console.log();
|
|
91
80
|
console.log(chalk.gray(` To start developing:`));
|
|
92
81
|
console.log();
|
|
@@ -127,24 +116,6 @@ async function getProjectOptions(projectName, skipPrompts) {
|
|
|
127
116
|
);
|
|
128
117
|
projectName = response.projectName;
|
|
129
118
|
}
|
|
130
|
-
if (!skipPrompts) {
|
|
131
|
-
const confirmResponse = await prompts(
|
|
132
|
-
{
|
|
133
|
-
type: "confirm",
|
|
134
|
-
name: "confirm",
|
|
135
|
-
message: `Create project "${projectName}" in current directory?`,
|
|
136
|
-
initial: true
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
onCancel: () => {
|
|
140
|
-
throw new Error("PROMPT_CANCELLED");
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
if (!confirmResponse.confirm) {
|
|
145
|
-
throw new Error("PROMPT_CANCELLED");
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
119
|
return {
|
|
149
120
|
projectName,
|
|
150
121
|
projectPath: path2.resolve(process.cwd(), projectName)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-nextspark-app",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.6",
|
|
4
4
|
"description": "Create a new NextSpark SaaS project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"bin",
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsup src/index.ts --format esm --outDir dist",
|
|
16
|
+
"dev": "tsup src/index.ts --format esm --watch --outDir dist"
|
|
17
|
+
},
|
|
14
18
|
"dependencies": {
|
|
15
19
|
"commander": "^12.0.0",
|
|
16
20
|
"chalk": "^5.3.0",
|
|
@@ -42,9 +46,5 @@
|
|
|
42
46
|
},
|
|
43
47
|
"engines": {
|
|
44
48
|
"node": ">=18.0.0"
|
|
45
|
-
},
|
|
46
|
-
"scripts": {
|
|
47
|
-
"build": "tsup src/index.ts --format esm --outDir dist",
|
|
48
|
-
"dev": "tsup src/index.ts --format esm --watch --outDir dist"
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|