Skip to content

Commit d4cb5fb

Browse files
few changes in notes
1 parent b46a57f commit d4cb5fb

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

class-notes.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,42 @@
66

77
. to Ignite our app - Bundler eg : vite,parcel,webpack
88

9-
In create react-app, they use webpack bundler
9+
. In create react-app, they use webpack bundler
1010

11-
Bundler is package/module of javascript code
11+
. Bundler is package/module of javascript code
1212

13-
to have a package in code -> we need Package Manager (eg : npm, yarn)
13+
. to have a package in code -> we need Package Manager (eg : npm, yarn)
1414

15+
```
1516
npm init -> create package.json -> initialise our repo with npm
1617
npm init -y -> to skip configuration
18+
```
1719

18-
why npm ?
20+
. why npm ?
1921
helper packages -> React app is powered by a lot of packages for bundling, optimizing, minifying
2022
maven : java :: rnpm : react
2123

22-
Parcel :
24+
`Parcel` :
25+
26+
```
2327
npm install package-name -> to install a package named package-name & node modules (helper functions )is created
2428
2529
npm install -d package-name -> -D means dev dependency or --save-dev
2630
31+
```
32+
2733
package-lock.json is created and parcel code is updated in node modules
2834

2935
parcel is in dev dependencies of package-lock - parcel is needed in dev environment
30-
~ update for major version
31-
^ automatic update for minor version
32-
without anything - exact version
3336

3437
if update happens, package.json is updated but package-lock.json is not updated
3538

3639
package-lock.json - dont ignore in git
37-
but put node modules in gitignofa-rotate-180
40+
but put node modules in .gitignore
3841

39-
if i have package-lock.json -> i can regenerate node modules
42+
if we have package-lock.json -> we can regenerate node modules
4043

41-
react cdn - not good way
44+
react cdn - is not a good way
4245
Good way -> in server thrugh node modules
4346

4447
npm install react -> in global dependencies not dev dependencies

0 commit comments

Comments
 (0)