You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then install a suitable LTS version. You can install as many versions as you like or need, see example below.
87
85
88
86
```consle
89
-
nvm install 16.13.2
87
+
nvm install 18.20.4
90
88
```
91
89
92
90
List the installed versions
93
91
94
92
```consle
95
93
nvm ls
96
-
v10.23.0
97
-
v12.18.2
98
-
v14.18.3
99
-
v15.5.1
100
-
-> v16.13.2
101
-
system
102
-
default -> 16.13.2 (-> v16.13.2)
94
+
-> v18.20.4
95
+
default -> 18.20.4 (-> v18.20.4)
96
+
103
97
...
104
98
```
105
99
106
-
**Important:** For docs, DO NOT use a version _above_ v10.23.0 and _below_ v14.17.0 as it may later conflict with other dependencies especially with the `yarn preview` command where you will get warnings and it may not work as expected.
100
+
**Important:** For docs, DO NOT use a version _above_ v10.23.0 and _below_ v14.17.0 as it may later conflict with other dependencies especially with the `npm run preview` command where you will get warnings and it may not work as expected.
107
101
108
102
**Info:** The backend to push to the web also uses node v16, see the `.drone.star` file. It is recommended to stay with the same release if possible.
109
103
110
104
Switch to a specific installed version of Node at any time, use the following command:
111
105
112
106
```consle
113
-
nvm use 16.13.2
107
+
nvm use 18.20.5
114
108
```
115
109
116
110
**Important:** If you have additional concurrent terminals open, you must close these terminals first and reopen them to use the new setup.
117
111
118
112
To make a particular Node version default in new terminals, type:
119
113
120
114
```consle
121
-
nvm alias default 16.13.2
115
+
nvm alias default 18.20.5
122
116
```
123
117
124
-
Now that you have Node installed, you can proceed with installing the Gulp CLI and Yarn.
125
-
126
-
### Yarn
127
-
128
-
Your system must have installed `yarn`. If this is not the case,
129
-
[install yarn](https://yarnpkg.com/lang/en/docs/install) following the installation
130
-
notes on the referenced site.
118
+
Now that you have Node installed, you can proceed with installing the Gulp CLI and npm.
131
119
132
120
### Install Dependencies
133
121
134
122
Finally, run the following command to install all dependencies:
135
123
136
124
```Shell
137
-
yarn install
125
+
npm install
138
126
```
139
127
140
128
### Add Packages
141
129
142
130
If a new package needs to be added, type the following:
143
131
144
132
```Shell
145
-
yarn add<package-name>
133
+
npm -i<package-name>
146
134
```
147
135
148
-
## Prepared Yarn Commands
136
+
## Prepared npm Commands
149
137
150
-
To see all prepared yarn commands, run the following command `yarn run`. This will output all commands with their settings, though this makes readability not easy. See the [yarn documentation](https://yarnpkg.com/lang/en/docs/cli/run/) for more information.
138
+
To see all prepared npm commands, run the following command `npm run`. This will output all commands with their settings, though this makes readability not easy. See the [npm documentation](https://docs.npmjs.com/cli/v11/using-npm/scripts) for more information.
151
139
152
140
Here is the list of commands and when to use them:
153
141
154
-
*`yarn bundle`
155
-
Generate a new `ui-bundle.zip` file for local use
156
-
*`yarn lint`
142
+
*`npm run lint`
157
143
Lint the UI bundle definition
158
-
*`yarn preview`
144
+
*`npm run bundle`
145
+
Generate a new `ui-bundle.zip` file for local use
146
+
*`npm run preview`
159
147
Preview the bundle using the gulp. This previews a demo Antora build.
160
148
161
149
## Preview
@@ -165,7 +153,7 @@ Preview the bundle using the gulp. This previews a demo Antora build.
165
153
If you want to preview your changes to the UI using the ownCloud documentation instead of demo content then you need to build a local copy of `ui-bundle.zip` and use it when generating the ownCloud documentation in your local development machine.
166
154
167
155
* First create a local `ui-bundle.zip` with the command described above.
168
-
* Then change into the respective documentation repository and run `yarn antora-dev-bundle`.
156
+
* Then change into the respective documentation repository and run `npm run antora-dev-bundle`.
169
157
See the [Generating the Documentation](https://github.com/owncloud/docs#generating-the-documentation) description for more details.
170
158
171
159
### Previewing Changes using a Demo Antora Build
@@ -175,5 +163,5 @@ The following example runs a demo Antora **build** (_not ownCloud_) for the docu
175
163
To view your changes as you are working on them, run the following command:
0 commit comments