Skip to content

Commit 3d46d11

Browse files
committed
Install cross-env as normal dependency as it is needed also in production
1 parent e613f34 commit 3d46d11

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/content/4/en/part4b.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ Next, let's change the scripts in our notes application <i>package.json</i> file
4242

4343
We specified the mode of the application to be <i>development</i> in the _npm run dev_ script. We also specified that the default _npm start_ command will define the mode as <i>production</i>.
4444

45-
There is a slight issue in the way that we have specified the mode of the application in our scripts: it will not work on Windows. We can correct this by installing the [cross-env](https://www.npmjs.com/package/cross-env) package as a development dependency with the command:
45+
There is a slight issue in the way that we have specified the mode of the application in our scripts: it will not work on Windows. We can correct this by installing the [cross-env](https://www.npmjs.com/package/cross-env) package as a project dependency using the command:
4646

4747
```bash
48-
npm install --save-dev cross-env
48+
npm install cross-env
4949
```
5050

5151
We can then achieve cross-platform compatibility by using the cross-env library in our npm scripts defined in <i>package.json</i>:

src/content/4/fi/osa4b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Määritellään nyt tiedostossa <i>package.json</i>, että testejä suoritettae
4040

4141
Samalla määriteltiin, että suoritettaessa sovellusta komennolla _npm run dev_ sovelluksen moodi on <i>development</i>. Jos sovellusta suoritetaan komennolla _npm start_, on moodiksi määritelty <i>production</i>.
4242

43-
Määrittelyssämme on kuitenkin pieni ongelma: se ei toimi Windowsilla. Tilanne korjautuu asentamalla kirjasto [cross-env](https://www.npmjs.com/package/cross-env) komennolla
43+
Määrittelyssämme on kuitenkin pieni ongelma: se ei toimi Windowsilla. Tilanne korjautuu asentamalla kirjasto [cross-env](https://www.npmjs.com/package/cross-env) projektin riippuvuudeksi komennolla
4444

4545
```bash
4646
npm install cross-env

0 commit comments

Comments
 (0)