@cerema/cadriciel 1.4.0-a → 1.4.0
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/cli/global/init.js +22 -78
- package/package.json +1 -1
package/cli/global/init.js
CHANGED
|
@@ -110,66 +110,16 @@ module.exports = (args) => {
|
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
exec('
|
|
114
|
-
if (errorPnpm)
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// If git and pnpm are installed, proceed with the operations
|
|
124
|
-
exec('pnpm i', (errorInstall) => {
|
|
125
|
-
if (errorInstall) {
|
|
126
|
-
spinner.fail(
|
|
127
|
-
`Problème pendant l'installation des dépendances :\n`,
|
|
128
|
-
errorInstall
|
|
129
|
-
);
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
exec(
|
|
134
|
-
'git init && git add --all && git commit -m "first commit" && git checkout -b dev',
|
|
135
|
-
(errorGit) => {
|
|
136
|
-
if (errorGit) {
|
|
137
|
-
spinner.fail(
|
|
138
|
-
'Error occurred during git operations:',
|
|
139
|
-
errorGit
|
|
140
|
-
);
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
113
|
+
exec('pnpm -v', (errorPnpm) => {
|
|
114
|
+
if (errorPnpm) {
|
|
115
|
+
spinner.fail(
|
|
116
|
+
`pnpm n'est pas installé sur votre système ! (https://pnpm.js.org/installation)`
|
|
117
|
+
);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
143
120
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
);
|
|
147
|
-
console.log(
|
|
148
|
-
`\n──────────────────────────────────────────────────────────────
|
|
149
|
-
|
|
150
|
-
Pour lancer l'environnement local de développement :
|
|
151
|
-
|
|
152
|
-
${chalk.magenta(' 📦 nécessite docker et docker-compose\n')}
|
|
153
|
-
|
|
154
|
-
cd ${chalk.green(name)}
|
|
155
|
-
${chalk.cyan('cad start')} .............. 🚀 ${chalk.bold(
|
|
156
|
-
"démarre l'environnement local de développement"
|
|
157
|
-
)}
|
|
158
|
-
|
|
159
|
-
${chalk.cyan('cad stop')} ............... 🚦 ${chalk.bold(
|
|
160
|
-
"arrête l'environnement."
|
|
161
|
-
)}
|
|
162
|
-
|
|
163
|
-
👉 https://cadriciel.k8-dev.cerema.fr/api 👈
|
|
164
|
-
|
|
165
|
-
──────────────────────────────────────────────────────────────\n`
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
);
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
// If bun is installed, proceed with the operations
|
|
172
|
-
exec('bun i', (errorInstall) => {
|
|
121
|
+
// If git and pnpm are installed, proceed with the operations
|
|
122
|
+
exec('pnpm i', (errorInstall) => {
|
|
173
123
|
if (errorInstall) {
|
|
174
124
|
spinner.fail(
|
|
175
125
|
`Problème pendant l'installation des dépendances :\n`,
|
|
@@ -189,29 +139,23 @@ module.exports = (args) => {
|
|
|
189
139
|
spinner.succeed('🚀 Votre projet a été correctement installé.\n');
|
|
190
140
|
console.log(
|
|
191
141
|
`\n──────────────────────────────────────────────────────────────
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
cd ${chalk.green(name)}
|
|
200
|
-
${chalk.cyan(
|
|
201
|
-
'cad start'
|
|
202
|
-
)} .............. 🚀 ${chalk.bold(
|
|
142
|
+
|
|
143
|
+
Pour lancer l'environnement local de développement :
|
|
144
|
+
|
|
145
|
+
${chalk.magenta(' 📦 nécessite docker et docker-compose\n')}
|
|
146
|
+
|
|
147
|
+
cd ${chalk.green(name)}
|
|
148
|
+
${chalk.cyan('cad start')} .............. 🚀 ${chalk.bold(
|
|
203
149
|
"démarre l'environnement local de développement"
|
|
204
150
|
)}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
'cad stop'
|
|
208
|
-
)} ............... 🚦 ${chalk.bold(
|
|
151
|
+
|
|
152
|
+
${chalk.cyan('cad stop')} ............... 🚦 ${chalk.bold(
|
|
209
153
|
"arrête l'environnement."
|
|
210
154
|
)}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
155
|
+
|
|
156
|
+
👉 https://cadriciel.k8-dev.cerema.fr/api 👈
|
|
157
|
+
|
|
158
|
+
──────────────────────────────────────────────────────────────\n`
|
|
215
159
|
);
|
|
216
160
|
}
|
|
217
161
|
);
|