Skip to content

Commit b884565

Browse files
authored
Merge pull request #2833 from RiikkaDream/source
Add note to Windows users when using shell scripts for the first time
2 parents bab51aa + 98861e9 commit b884565

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

src/content/3/en/part3b.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,15 @@ The script looks like this
388388
}
389389
}
390390
```
391+
392+
##### Note for Windows users
393+
Note that the standard shell commands in `build:ui` do not natively work in Windows. Powershell in Windows works differently, in which case the script could be written as
394+
```json
395+
"build:ui": "@powershell Remove-Item -Recurse -Force build && cd ../frontend && npm run build && @powershell Copy-Item build -Recurse ../backend",
396+
```
397+
398+
If the script does not work on Windows, confirm that you are using Powershell and not Command Prompt. If you have installed Git Bash or another Linux-like terminal, you may be able to run Linux-like commands on Windows as well.
399+
391400
392401
The script _npm run build:ui_ builds the frontend and copies the production version under the backend repository. _npm run deploy_ releases the current backend to Fly.io.
393402

src/content/3/es/part3b.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,16 @@ Para crear una nueva compilación de producción del frontend sin trabajo manual
227227
}
228228
```
229229
230+
##### Para usuarios de Windows
231+
232+
Tenga en cuenta que los comandos de shell estándar en `build:ui` no funcionan de forma nativa en Windows. En Powershell de Windows se puede escribir el script como
233+
234+
```json
235+
"build:ui": "@powershell Remove-Item -Recurse -Force build && cd ../../osa2/materiaali/notes-new && npm run build && @powershell Copy-Item build -Recurse ../../../osa3/notes-backend/"
236+
```
237+
238+
Si el script no funciona en Windows, confirme que está utilizando Powershell en vez de Command Prompt. Si ha instalado Git Bash u otro terminal como Linux, también posiblemente puede ejecutar comandos similares a Linux en Windows.
239+
230240
El script _npm run build:ui_ construye el frontend y copia la versión de producción en el repositorio backend. _npm run deploy_ libera el backend actual a heroku.
231241
232242
_npm run deploy:full_: full combina estos dos y contiene los comandos <i>git</i> necesarios para actualizar el repositorio de backend.

src/content/3/fi/osa3b.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,15 @@ Fly.io:n tapauksessa skriptit näyttävät seuraavalta:
329329
}
330330
}
331331
```
332+
333+
##### Huomautus Windows-käyttäjille
334+
Huomaa, että näistä `build:ui`:n käyttämät shell-komennot eivät toimi natiivisti Windowsilla, jonka powershell käyttää eri komentoja. Tällöin skripti olisi
335+
```json
336+
"build:ui": "@powershell Remove-Item -Recurse -Force build && cd ../frontend && npm run build && @powershell Copy-Item build -Recurse ../backend",
337+
```
338+
339+
Mikäli skripti ei toimi Windowsilla, tarkista, että terminaalisi sovelluskehitysympäristössäsi on Powershell eikä esimerkiksi Command Prompt. Jos olet asentanut Git Bash -terminaalin, tai muun Linuxia matkivan terminaalin tai ympäristön, saatat pystyä ajamaan Linuxin kaltaisia komentoja myös Windowsilla.
340+
332341
333342
Skripteistä _npm run build:ui_ kääntää ui:n tuotantoversioksi ja kopioi sen. _npm run deploy_ julkaisee Fly.io:n.
334343

0 commit comments

Comments
 (0)