Skip to content

Commit b908ff8

Browse files
authored
Merge pull request #3062 from replicatedhq/fix/security-vulnerabilities-new
remove yarn and only use npm to fix dependencies
2 parents 07c808d + 9163a1b commit b908ff8

File tree

4 files changed

+16119
-13967
lines changed

4 files changed

+16119
-13967
lines changed

README.md

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,39 +40,52 @@ This repository has been made public so that vendors and the open-source communi
4040

4141
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4242

43-
When you submit a PR in GitHub, Netlify builds a preview automatically. However, you can preview your changes locally. To do this, you must install `yarn` and run a build to create a Docusaurus preview in your local browser.
43+
When you submit a PR in GitHub, Netlify builds a preview automatically. However, you can preview your changes locally using Node.js and npm. This repository uses npm as its package manager.
4444

45-
### Install yarn
45+
### Prerequisites
4646

47-
The Yarn documentation recommends installing Yarn using the npm package manager, which comes bundled with Node.js when you install it on your system.
47+
- Node.js version 18 or higher
48+
- npm (comes bundled with Node.js)
4849

49-
After you install npm, you can run the following both to install and upgrade Yarn:
50+
### Start the local dev server with `npm start`
5051

51-
```
52-
npm install --global yarn
53-
```
52+
1. Install dependencies using npm:
53+
54+
```bash
55+
npm install
56+
```
5457

55-
If you use Homebrew, you can run this command to install Yarn:
58+
2. Start a local development server in a browser window:
5659

57-
```
58-
$ brew install yarn
59-
```
60+
```bash
61+
npm start
62+
```
6063

61-
### Create a Local Development Server and WYSIWYG Preview
64+
Most changes are reflected live without having to restart the server (changes to the sidebar file typically require restarting the dev server). This preview shows the formatting and styles as they would render on the live site.
6265

63-
1. Install the docusaurus package using Yarn:
66+
If you encounter any build errors, they will appear in the terminal and often indicate issues like broken links or formatting problems in the content.
6467

65-
```
66-
yarn add docusaurus
67-
```
68+
## Build and test locally with `npm run build` and `npm run serve`
6869

69-
1. Run the following command to start a local development server and open up a browser window. Most changes are reflected live without having to restart the server. This preview shows the formatting and styles as they would render on the live site (also known as what-you-see-is-what-you-get or WYSIWYG), which can be more helpful than viewing content in a VS Code preview.
70+
Before pushing changes to the remote repository, build and serve the site locally to check for errors, including broken links.
7071

71-
```
72-
$ yarn start
73-
```
72+
1. Install dependencies using npm:
7473

75-
If `yarn start` refuses to start, try reinstalling the `yarn` CLI. You do not need to uninstall `yarn` before reinstalling it. However, if you get build errors from your content, such as broken links, the Preview itself fails and error messages appear in the terminal that can help you troubleshoot the problems in the content.
74+
```bash
75+
npm install
76+
```
77+
1. Build the static site files:
78+
79+
```bash
80+
npm run build
81+
```
82+
Any broken links and anchor links are listed in the output.
83+
84+
1. Serve the `build` directory locally to test:
85+
86+
```bash
87+
npm run serve
88+
```
7689

7790
## Folder Structure and TOC
7891

0 commit comments

Comments
 (0)