create-nextblock 0.2.7 → 0.2.8
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/create-nextblock.js +15 -15
- package/package.json +1 -1
package/bin/create-nextblock.js
CHANGED
|
@@ -133,15 +133,6 @@ async function handleCommand(projectDirectory, options) {
|
|
|
133
133
|
await ensureEnvExample(projectDir);
|
|
134
134
|
console.log(chalk.green('.env.example ready.'));
|
|
135
135
|
|
|
136
|
-
await ensureSupabaseAssets(projectDir);
|
|
137
|
-
console.log(chalk.green('Supabase migrations ready.'));
|
|
138
|
-
|
|
139
|
-
if (!yes) {
|
|
140
|
-
await runSetupWizard(projectDir, projectName);
|
|
141
|
-
} else {
|
|
142
|
-
console.log(chalk.yellow('Skipping interactive setup wizard because --yes was provided.'));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
136
|
await sanitizeLayout(projectDir);
|
|
146
137
|
console.log(chalk.green('Global styles configured.'));
|
|
147
138
|
|
|
@@ -154,21 +145,28 @@ async function handleCommand(projectDirectory, options) {
|
|
|
154
145
|
await sanitizeNextConfig(projectDir, editorUtilNames);
|
|
155
146
|
console.log(chalk.green('next.config.js sanitized.'));
|
|
156
147
|
|
|
157
|
-
await transformPackageJson(projectDir);
|
|
158
|
-
console.log(chalk.green('Dependencies updated for public packages.'));
|
|
159
|
-
|
|
160
|
-
if (!skipInstall) {
|
|
161
|
-
await installDependencies(projectDir);
|
|
148
|
+
await transformPackageJson(projectDir);
|
|
149
|
+
console.log(chalk.green('Dependencies updated for public packages.'));
|
|
150
|
+
|
|
151
|
+
if (!skipInstall) {
|
|
152
|
+
await installDependencies(projectDir);
|
|
162
153
|
} else {
|
|
163
154
|
console.log(chalk.yellow('Skipping dependency installation.'));
|
|
164
155
|
}
|
|
165
156
|
|
|
157
|
+
// Run setup wizard after dependencies are installed so package assets are available
|
|
158
|
+
if (!yes) {
|
|
159
|
+
await runSetupWizard(projectDir, projectName);
|
|
160
|
+
} else {
|
|
161
|
+
console.log(chalk.yellow('Skipping interactive setup wizard because --yes was provided.'));
|
|
162
|
+
}
|
|
163
|
+
|
|
166
164
|
await initializeGit(projectDir);
|
|
167
165
|
console.log(chalk.green('Initialized a new Git repository.'));
|
|
168
166
|
|
|
169
167
|
console.log(chalk.green(`\nSuccess! Your NextBlock CMS project "${projectName}" is ready.\n`));
|
|
170
168
|
console.log(chalk.cyan('Next step:'));
|
|
171
|
-
console.log(chalk.cyan(
|
|
169
|
+
console.log(chalk.cyan(` cd ${projectName} && npm run dev`));
|
|
172
170
|
} catch (error) {
|
|
173
171
|
console.error(
|
|
174
172
|
chalk.red(error instanceof Error ? error.message : 'An unexpected error occurred'),
|
|
@@ -221,6 +219,8 @@ async function runSetupWizard(projectDir, projectName) {
|
|
|
221
219
|
// ignore if not supported
|
|
222
220
|
}
|
|
223
221
|
process.stdin.setEncoding('utf8');
|
|
222
|
+
process.stdin.removeAllListeners('data');
|
|
223
|
+
process.stdin.removeAllListeners('keypress');
|
|
224
224
|
}
|
|
225
225
|
process.stdin.resume();
|
|
226
226
|
|