Skip to content

Commit fbf713b

Browse files
GauriBhandariSonichigo
authored andcommitted
[docs]: Added instructions for using npm to run the Docusaurus site locally (#423)
* docs(configuration): added example for handling nested JSON fields Added example for handling nested JSON fields Closes #1892 Signed-off-by: GauriBhandari <[email protected]> * docs: add instructions for using npm to run the Docusaurus site locally Added instructions for using npm to run the Docusaurus site locally Closes #2094 Signed-off-by: Gauri Bhandari <[email protected]> Signed-off-by: GauriBhandari <[email protected]> * docs: add instructions for using npm to run the Docusaurus site locally Added note Closes #2094 Signed-off-by: Gauri Bhandari <[email protected]> Signed-off-by: GauriBhandari <[email protected]> * Updated documentation to reflect npm migration Revised the documentation to include instructions for using npm instead of yarn Migration from using yarn to npm on docs website Closes #2094 Signed-off-by: Gauri Bhandari <[email protected]> Signed-off-by: GauriBhandari <[email protected]> * docs: update npm migration instructions Revised the documentation to include instructions for using npm instead of yarn. This change reflects the migration from using yarn to npm for building, testing, and deploying the docs website. Closes #2094 Signed-off-by: GauriBhandari <[email protected]> * ci: update lint.yml to ensure proper commit message formatting This commit updates the lint.yml file to ensure that commit messages follow the required format. Closes #2094 Signed-off-by: Gauri Bhandari <[email protected]> Signed-off-by: GauriBhandari <[email protected]> * docs: update npm migration instructions Closes #2094 Signed-off-by: Gauri Bhandari <[email protected]> Signed-off-by: GauriBhandari <[email protected]> * docs: update installation instructions for npm migration Revised the documentation to reflect the migration from Yarn to npm for building, testing, and deploying the docs website. Closes #2094 Signed-off-by: GauriBhandari <[email protected]> --------- Signed-off-by: GauriBhandari <[email protected]> Signed-off-by: Gauri Bhandari <[email protected]> Co-authored-by: Animesh Pathak <[email protected]>
1 parent eea73cc commit fbf713b

File tree

5 files changed

+49
-15793
lines changed

5 files changed

+49
-15793
lines changed

.github/workflows/build_and_check.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@ jobs:
2020
with:
2121
node-version: 18.0.0
2222

23-
- name: Install Yarn
24-
run: npm install -g yarn
25-
2623
- name: Install Dependencies
27-
run: yarn install
24+
run: npm install
2825

2926
- name: Build Documentation
30-
run: yarn build
27+
run: npm run build

.github/workflows/lint.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ jobs:
1515
with:
1616
fetch-depth: 0
1717

18+
- name: Set up Node.js
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: '18.0.0'
22+
23+
- name: Install Dependencies
24+
run: npm install
25+
1826
- name: Check commits messages
1927
uses: wagoid/commitlint-github-action@v5
2028
env:

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ The Keploy documentation site uses [Docusaurus 2](https://v2.docusaurus.io/), wh
6464
You can make changes locally without previewing them in the browser.
6565
However, if you want to build the site and preview changes in the browser, you need to have [Docusaurus 2 dependencies](https://v2.docusaurus.io/docs/installation/#requirements) installed.
6666

67-
Initialize Docusaurus 2 in the repo by running [`yarn`](https://classic.yarnpkg.com/en/docs/cli/) once in the root directory of the repo.
67+
Initialize Docusaurus 2 in the repo by running [`npm`](https://docs.npmjs.com/cli/v7/commands/npm-install) once in the root directory of the repo.
6868

6969
Now you can build and view the site locally:
7070

7171
```bash
72-
yarn start
72+
npm install
73+
npm start
7374
```
7475

7576
The command starts a local development server and opens a browser window.
@@ -95,17 +96,17 @@ cd docs
9596
3. Install all the dependencies
9697

9798
```sh
98-
yarn install
99+
npm install
99100

100101
## Start the development server.
101102

102-
yarn start
103+
npm start
103104
```
104105

105106
4. To reformat:
106107

107108
```sh
108-
yarn prettier --write '**/*.{js,md}'
109+
npm prettier --write '**/*.{js,md}'
109110
```
110111

111112
5. Check the build status:

versioned_docs/version-2.0.0/keploy-explained/docs-dev-guide.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,16 @@ The Keploy documentation site uses [Docusaurus 2](https://v2.docusaurus.io/), wh
2929
You can make changes locally without previewing them in the browser.
3030
However, if you want to build the site and preview changes in the browser, you need to have [Docusaurus 2 dependencies](https://v2.docusaurus.io/docs/installation/#requirements) installed.
3131

32-
Initialize Docusaurus 2 in the repo by running [`yarn`](https://classic.yarnpkg.com/en/docs/cli/) once in the root directory of the repo.
32+
Initialize Docusaurus 2 in the repo by running [`yarn`](https://classic.yarnpkg.com/en/docs/cli/) or [`npm`](https://docs.npmjs.com/cli/v10) once in the root directory of the repo.
3333

3434
Now you can build and view the site locally:
3535

36+
```shell
37+
npm start
38+
```
39+
40+
or
41+
3642
```shell
3743
yarn start
3844
```
@@ -41,6 +47,10 @@ The command starts a local development server and opens a browser window.
4147

4248
## Prettier
4349

50+
**Note: The website has been migrated to use `npm` for building, testing, and deploying.**
51+
52+
Steps 1 to 3 are the same for both `yarn` and `npm`
53+
4454
1. Fork the repository
4555

4656
2. Clone the repository with the following command. Replace the {'<'}GITHUB_USERNAME{'>'} with your username
@@ -55,6 +65,28 @@ git clone https://github.com/<GITHUB_USERNAME>/docs.git
5565
cd docs
5666
```
5767

68+
### Using `npm`
69+
70+
4. Install all the dependencies
71+
72+
```shell
73+
npm install
74+
```
75+
76+
5. Start the development server.
77+
78+
```shell
79+
npm start
80+
```
81+
82+
6. To reformat:
83+
84+
```shell
85+
npm prettier --write '**/*.{js,md}'
86+
```
87+
88+
### Using `yarn` (Legacy)
89+
5890
4. Install all the dependencies
5991

6092
```shell

0 commit comments

Comments
 (0)