Skip to content

Commit 1f1c69b

Browse files
committed
docs: update contributing guidelines
1 parent 1dbe830 commit 1f1c69b

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ Before submitting a pull request (PR), consider [filing an issue](https://github
44

55
## Prerequisites
66

7-
- [Node.js](https://nodejs.org/en/download/package-manager/) (version >=20)
8-
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-installer-to-install-nodejs-and-npm)
7+
**Codebase**
8+
9+
- [Bun](https://bun.com/docs/installation)
10+
11+
**Docs**
12+
13+
- [Node.js](https://nodejs.org/en/download/package-manager/) (version 20)
14+
- Installing Node should automatically install [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-installer-to-install-nodejs-and-npm)
915

1016
## Project set-up
1117

@@ -29,30 +35,29 @@ git remote -v
2935
Install the project dependencies.
3036

3137
```sh
32-
npm install
38+
bun install
3339
```
3440

3541
## Documentation set-up
3642

3743
Component documentation is located in the `docs` folder. The website is built using svite, routify, and MDsveX. You will need to create a symbolic project link in order to see live changes reflected when developing locally.
3844

39-
First, create a symbolic link at the root of the project:
45+
Running the docs site requires Node.js version 20.
46+
47+
Use `nvm` to switch:
4048

4149
```sh
42-
npm link
50+
nvm use 20
4351
```
4452

45-
Then, go into `docs` and link the package.
53+
To run the docs site:
4654

4755
```sh
4856
cd docs
49-
npm link "carbon-components-svelte"
50-
npm install
57+
nvm use 20 && npm i && npm run dev
5158
```
5259

53-
If linked correctly, any change to a component in the `src` folder should be reflected in the `docs` site.
54-
55-
---
60+
The site should be served at http://localhost:5173/ (or the next available port).
5661

5762
## Development workflow
5863

@@ -64,14 +69,6 @@ git checkout -b new-feature
6469

6570
Preview changes to components from the `src` folder in the documentation website located in `docs/`.
6671

67-
In the `docs` folder, run:
68-
69-
```sh
70-
npm run dev
71-
```
72-
73-
The site should be served at http://localhost:5173/ (or the next available port).
74-
7572
### Component Format
7673

7774
Each component should adopt the following structure:
@@ -114,12 +111,12 @@ export {
114111
} from "./ComposedModal";
115112
```
116113

117-
### Run `npm run build:docs`
114+
### Run `bun run build:docs`
118115

119116
Run the following command to re-generate TypeScript definitions and documentation.
120117

121118
```sh
122-
npm run build:docs
119+
bun run build:docs
123120
```
124121

125122
## Submit a Pull Request
@@ -150,11 +147,11 @@ The workflow is automatically triggered when pushing a tag that begins with `v`
150147

151148
However, maintainers must perform a few things in preparation for a release.
152149

153-
Locally, while on `master` and the branch is clean, run `npm run release`. This command will:
150+
Locally, while on `master` and the branch is clean, run `bun run release`. This command will:
154151

155152
- Bump the semantic version in `package.json`
156153
- Generate notes in `CHANGELOG.md`
157-
- Run `npm run build:docs` to update the generated documentation
154+
- Run `bun run build:docs` to update the generated documentation
158155

159156
This command will not create a commit nor tag. Afterwards, perform the following manually:
160157

0 commit comments

Comments
 (0)