|
| 1 | +Before starting an update, it's recommended to have a clean git branch. Having a clean branch allows inspecting all the changes done during the update one last time before committing them. |
| 2 | + |
| 3 | +## Update steps |
| 4 | + |
| 5 | +### Update NativeScript CLI |
| 6 | + |
| 7 | +Every update starts with updating the NativeScript CLI to the latest version. |
| 8 | + |
| 9 | +```cli |
| 10 | +npm install -g nativescript@latest |
| 11 | +``` |
| 12 | + |
| 13 | +Once installed, verify the version with: |
| 14 | + |
| 15 | +```bash |
| 16 | +$ ns -v |
| 17 | +# should print the version: |
| 18 | +v8.x.x |
| 19 | +✔ Up to date. |
| 20 | +``` |
| 21 | + |
| 22 | +### Update runtimes, core and webpack |
| 23 | + |
| 24 | +For a quick update of the essential dependencies, run: |
| 25 | + |
| 26 | +```cli |
| 27 | +ns update |
| 28 | +``` |
| 29 | + |
| 30 | +The following packages will be updated to their `latest` versions: |
| 31 | + |
| 32 | +```bash |
| 33 | +@nativescript/core |
| 34 | +@nativescript/webpack |
| 35 | +@nativescript/types # if installed |
| 36 | +@nativescript/ios # if installed |
| 37 | +@nativescript/android # if installed |
| 38 | +``` |
| 39 | + |
| 40 | +::: info Note |
| 41 | + |
| 42 | +If you prefer to update dependencies manually, you can do that as well, for example by manually changing versions in `package.json` then installing dependencies. |
| 43 | + |
| 44 | +::: |
| 45 | + |
| 46 | +### Clean project |
| 47 | + |
| 48 | +To make sure all dependencies are updated correctly, it's recommended to clean the project with: |
| 49 | + |
| 50 | +```cli |
| 51 | +ns clean |
| 52 | +``` |
0 commit comments