vako 1.3.16 → 1.3.17
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/commands/setup.js +32 -16
- package/bin/vako.js +1 -1
- package/package.json +1 -1
package/bin/commands/setup.js
CHANGED
|
@@ -93,8 +93,17 @@ class SetupWizard {
|
|
|
93
93
|
console.clear();
|
|
94
94
|
await this.showWelcome();
|
|
95
95
|
await this.gatherProjectInfo();
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
|
|
97
|
+
// Sélection du type de code (EJS, TypeScript, Next.js)
|
|
98
|
+
if (typeof this.selectCodeType === 'function') {
|
|
99
|
+
await this.selectCodeType();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Sélection de la langue du site
|
|
103
|
+
if (typeof this.selectLanguage === 'function') {
|
|
104
|
+
await this.selectLanguage();
|
|
105
|
+
}
|
|
106
|
+
|
|
98
107
|
await this.selectTemplate();
|
|
99
108
|
await this.selectFeatures();
|
|
100
109
|
await this.configureDatabase();
|
|
@@ -234,21 +243,28 @@ class SetupWizard {
|
|
|
234
243
|
}
|
|
235
244
|
];
|
|
236
245
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
246
|
+
try {
|
|
247
|
+
const { codeType } = await inquirer.prompt([{
|
|
248
|
+
type: 'list',
|
|
249
|
+
name: 'codeType',
|
|
250
|
+
message: '🎯 Select your preferred code type:',
|
|
251
|
+
choices: codeTypeChoices.map(choice => ({
|
|
252
|
+
name: choice.name,
|
|
253
|
+
value: choice.value
|
|
254
|
+
})),
|
|
255
|
+
pageSize: 10
|
|
256
|
+
}]);
|
|
247
257
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
258
|
+
this.config.codeType = codeType || 'ejs'; // Par défaut EJS
|
|
259
|
+
|
|
260
|
+
const selectedChoice = codeTypeChoices.find(c => c.value === codeType);
|
|
261
|
+
if (selectedChoice) {
|
|
262
|
+
console.log(chalk.gray(`\n✓ Selected: ${selectedChoice.description}\n`));
|
|
263
|
+
}
|
|
264
|
+
} catch (error) {
|
|
265
|
+
console.error(chalk.red('Error selecting code type:'), error.message);
|
|
266
|
+
this.config.codeType = 'ejs'; // Par défaut EJS en cas d'erreur
|
|
267
|
+
}
|
|
252
268
|
}
|
|
253
269
|
|
|
254
270
|
/**
|
package/bin/vako.js
CHANGED
package/package.json
CHANGED