create-fleetbo-project 1.2.101 → 1.2.102
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.
|
@@ -200,22 +200,24 @@ const result = spawnSync('npx', ['-y', 'fleetbo-cockpit-cli@latest', ...args], {
|
|
|
200
200
|
|
|
201
201
|
process.exit(result.status || 0);
|
|
202
202
|
`;
|
|
203
|
-
|
|
203
|
+
// On utilise l'extension .cjs pour forcer le CommonJS
|
|
204
|
+
fs.writeFileSync(path.join(fleetboDir, 'engine.cjs'), engineScript, 'utf8');
|
|
204
205
|
|
|
205
206
|
// --- 2. MODIFICATION DU PACKAGE.JSON POUR MASQUER L'ARCHITECTURE ---
|
|
206
207
|
const packageJsonPath = path.join(projectDir, 'package.json');
|
|
207
208
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
208
209
|
packageJson.name = projectName;
|
|
209
210
|
|
|
211
|
+
// On appelle engine.cjs dans les scripts
|
|
210
212
|
packageJson.scripts = {
|
|
211
213
|
"dev": "vite",
|
|
212
214
|
"build": "vite build",
|
|
213
215
|
"lint": "eslint .",
|
|
214
216
|
"preview": "vite preview",
|
|
215
|
-
"fleetbo": "node .fleetbo/engine.
|
|
216
|
-
"android": "node .fleetbo/engine.
|
|
217
|
-
"ios": "node .fleetbo/engine.
|
|
218
|
-
"alex": "node .fleetbo/engine.
|
|
217
|
+
"fleetbo": "node .fleetbo/engine.cjs",
|
|
218
|
+
"android": "node .fleetbo/engine.cjs android",
|
|
219
|
+
"ios": "node .fleetbo/engine.cjs ios",
|
|
220
|
+
"alex": "node .fleetbo/engine.cjs alex"
|
|
219
221
|
};
|
|
220
222
|
|
|
221
223
|
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf8');
|
|
@@ -231,7 +233,7 @@ process.exit(result.status || 0);
|
|
|
231
233
|
}
|
|
232
234
|
|
|
233
235
|
// ==========================================
|
|
234
|
-
//
|
|
236
|
+
// L'ANNONCE DE SUCCÈS ET LE MINI-TUTO
|
|
235
237
|
// ==========================================
|
|
236
238
|
console.log('\n \x1b[1;32m✓ [Fleetbo] Project successfully created!\x1b[0m');
|
|
237
239
|
console.log(`\n Installation path: \x1b[36m${projectDir}\x1b[0m\n`);
|