-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4c7324
commit 8a926af
Showing
4 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ Nyt mennään modernin JavaSriptin muotisanoihin eli niihin yleisiin termeihin, | |
- Eli sama engine mikä tulkitsee JS-koodia, tulkitsee sitä myös nodessa | ||
- keino suorittaa JS-koodia palvelimella (ei selaimessa) | ||
- globaali objekti on nyt eri => `node node-global.js` | ||
- esim. `node by-value-by-reference.js` toimii kuten ko. tiedoston ajaisi selaimessa | ||
- esim. `node weird-objects.js` toimii kuten ko. tiedoston ajaisi selaimessa | ||
- ei `window` | ||
|
||
## NPM | ||
|
@@ -168,8 +168,7 @@ if (name == "Sale") { | |
### Installation and configuration | ||
|
||
1. Asenna tarvittavat npm paketit: | ||
`npm install --save-dev @babel/core @babel/cli @babel/preset-env webpack webpack-cli babel-loader prettier eslint eslint-config-prettier` | ||
`npm install [email protected]` | ||
`npm install [email protected] && npm install --save-dev @babel/core @babel/cli @babel/preset-env webpack webpack-cli babel-loader prettier eslint eslint-config-prettier` | ||
|
||
2. Lisää tarvittavat konfiguraatio tiedostot | ||
a) `.babelrc`: kerrot Babelille mitä plugareita/presettejä sen pitää käyttää | ||
|
@@ -186,6 +185,7 @@ if (name == "Sale") { | |
scripts: { | ||
… | ||
"watch": "npx webpack --watch", | ||
"dev": "npx webpack --mode development", | ||
"build": "npx webpack --mode production", | ||
… | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters