create-fleetbo-project 1.0.2 → 1.0.3

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.
@@ -4,6 +4,15 @@ const { execSync } = require('child_process');
4
4
  const fs = require('fs');
5
5
  const path = require('path');
6
6
  const rimraf = require('rimraf'); // Ajoutez cette ligne pour gérer la suppression du dossier .git
7
+ const packageInfo = require('./package.json');
8
+
9
+ // Générer le contenu du fichier .env
10
+ const envContent = `REACT_APP_PROJECT_NAME="${packageInfo.name}"\n`;
11
+
12
+ // Écrire dans le fichier .env
13
+ fs.writeFileSync('.env', envContent, 'utf8');
14
+ console.log('.env file has been updated with project name!');
15
+
7
16
 
8
17
  if (process.argv.length < 3) {
9
18
  console.error('Usage: create-fleetbo-project <project-name>');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fleetbo-project",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -10,7 +10,7 @@
10
10
  "create-fleetbo-project": "install-react-template.js"
11
11
  },
12
12
  "dependencies": {
13
- "rimraf": "^3.0.2"
13
+ "rimraf": "^4.4.0"
14
14
  },
15
15
  "keywords": [],
16
16
  "author": "",