Skip to content

Commit ff65e67

Browse files
committed
docs: initial updating docs cleanup/refactor
1 parent 9e9f614 commit ff65e67

File tree

7 files changed

+117
-198
lines changed

7 files changed

+117
-198
lines changed

content/guide/updating-an-app.md

Lines changed: 0 additions & 197 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: Updating from 6.x to 7.x
3+
description: Example.
4+
---
5+
6+
<!-- @include: ./common-steps.md -->
7+
8+
## Breaking Changes
9+
10+
### Example Breaking Change
11+
12+
```diff
13+
- foo
14+
+ bar
15+
```

content/guide/updating/index.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Updating
3+
description: Updating an app to the latest version of NativeScript.
4+
contributors:
5+
- rigor789
6+
---
7+
8+
Updating a NativeScript app is usually a quick process if done regularly. The following guides aim to document the general update steps, highlighting breaking changes (if any) when updating between specific versions.
9+
10+
## Update guides
11+
12+
- [Updating to latest](/guide/updating/to-latest)
13+
- More soon...
14+
15+
## Updating to a tagged version
16+
17+
To try upcoming features that have not been release yet, you can install the `next` tag of the CLI (built from the latest commit in the [NativeScript CLI repository](https://github.com/NativeScript/nativescript-cli/commits/main)) via:
18+
19+
```cli
20+
npm install -g nativescript@next
21+
```
22+
23+
You can also pass a tag to the `ns update` command.
24+
25+
For example, to try all the latest features that have not made it into a stable release yet, you can run:
26+
27+
```cli
28+
ns update next
29+
```

content/guide/updating/sidebar.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { NSSidebarItem } from '../../../.vitepress/theme/vitepress-theme'
2+
3+
export default [
4+
{
5+
text: 'To Latest',
6+
link: '/guide/updating/to-latest',
7+
},
8+
] as NSSidebarItem[]

content/guide/updating/to-latest.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Updating to latest
3+
description: Updating to the latest version of NativeScript.
4+
contributors:
5+
- rigor789
6+
---
7+
8+
<!-- @include: ./common-steps.md -->

content/sidebar.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import type { NSSidebarGroup } from '../.vitepress/theme/vitepress-theme'
22

3+
import updatingItems from './guide/updating/sidebar'
4+
35
export default [
46
{
57
text: 'The Basics',
@@ -75,7 +77,9 @@ export default [
7577
},
7678
{
7779
text: 'Updating',
78-
link: '/guide/updating-an-app',
80+
link: '/guide/updating/',
81+
hideChildren: true,
82+
items: updatingItems
7983
},
8084
],
8185
},

0 commit comments

Comments
 (0)