@@ -143,41 +143,31 @@ De nos jours, pratiquement tous les projets JavaScript sont définis à l'aide d
143143
144144``` json
145145{
146- "name" : " notes" ,
147- "version" : " 0.1.0" ,
146+ "name" : " part2-notes-frontend" ,
148147 "private" : true ,
149- "dependencies" : {
150- "@testing-library/jest-dom" : " ^5.16.1" ,
151- "@testing-library/react" : " ^12.1.2" ,
152- "@testing-library/user-event" : " ^13.5.0" ,
153- "react" : " ^17.0.2" ,
154- "react-dom" : " ^17.0.2" ,
155- "react-scripts" : " 5.0.0" ,
156- "web-vitals" : " ^2.1.3"
157- },
148+ "version" : " 0.0.0" ,
149+ "type" : " module" ,
158150 "scripts" : {
159- "start " : " react-scripts start " ,
160- "build" : " react-scripts build" ,
161- "test " : " react-scripts test " ,
162- "eject " : " react-scripts eject "
151+ "dev " : " vite " ,
152+ "build" : " vite build" ,
153+ "lint " : " eslint . " ,
154+ "preview " : " vite preview "
163155 },
164- "eslintConfig" : {
165- "extends" : [
166- " react-app" ,
167- " react-app/jest"
168- ]
156+ "dependencies" : {
157+ "react" : " ^18.3.1" ,
158+ "react-dom" : " ^18.3.1"
169159 },
170- "browserslist " : {
171- "production " : [
172- " >0.2% " ,
173- " not dead " ,
174- " not op_mini all "
175- ] ,
176- "development " : [
177- " last 1 chrome version " ,
178- " last 1 firefox version " ,
179- " last 1 safari version "
180- ]
160+ "devDependencies " : {
161+ "@eslint/js " : " ^9.17.0 " ,
162+ "@types/react" : " ^18.3.18 " ,
163+ "@types/react-dom" : " ^18.3.5 " ,
164+ "@vitejs/plugin-react" : " ^4.3.4 " ,
165+ "eslint" : " ^9.17.0 " ,
166+ "eslint-plugin-react " : " ^7.37.2 " ,
167+ "eslint-plugin-react-hooks" : " ^5.0.0 " ,
168+ "eslint-plugin-react-refresh" : " ^0.4.16 " ,
169+ "globals" : " ^15.14.0 " ,
170+ "vite" : " ^6.0.5 "
181171 }
182172}
183173```
@@ -197,18 +187,20 @@ Axios est désormais inclus parmi les autres dépendances :
197187
198188``` json
199189{
200- "name" : " notes" ,
201- "version" : " 0.1.0" ,
190+ "name" : " part2-notes-frontend" ,
202191 "private" : true ,
192+ "version" : " 0.0.0" ,
193+ "type" : " module" ,
194+ "scripts" : {
195+ "dev" : " vite" ,
196+ "build" : " vite build" ,
197+ "lint" : " eslint ." ,
198+ "preview" : " vite preview"
199+ },
203200 "dependencies" : {
204- "@testing-library/jest-dom" : " ^5.16.1" ,
205- "@testing-library/react" : " ^12.1.2" ,
206- "@testing-library/user-event" : " ^13.5.0" ,
207- "axios" : " ^0.24.0" , // highlight-line
208- "react" : " ^17.0.2" ,
209- "react-dom" : " ^17.0.2" ,
210- "react-scripts" : " 5.0.0" ,
211- "web-vitals" : " ^2.1.3"
201+ "axios" : " ^1.7.9" , // highlight-line
202+ "react" : " ^18.3.1" ,
203+ "react-dom" : " ^18.3.1"
212204 },
213205 // ...
214206}
@@ -228,11 +220,11 @@ et faire un petit ajout à la partie <i>scripts</i> du fichier <i>package.json</
228220{
229221 // ...
230222 "scripts" : {
231- "start " : " react-scripts start " ,
232- "build" : " react-scripts build" ,
233- "test " : " react-scripts test " ,
234- "eject " : " react-scripts eject " ,
235- "server" : " json-server -p3001 --watch db.json" // highlight-line
223+ "dev " : " vite " ,
224+ "build" : " vite build" ,
225+ "lint " : " eslint . " ,
226+ "preview " : " vite preview " ,
227+ "server" : " json-server -p 3001 db.json" // highlight-line
236228 },
237229}
238230```
0 commit comments