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
- 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)
9
15
10
16
## Project set-up
11
17
@@ -29,30 +35,29 @@ git remote -v
29
35
Install the project dependencies.
30
36
31
37
```sh
32
-
npm install
38
+
bun install
33
39
```
34
40
35
41
## Documentation set-up
36
42
37
43
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.
38
44
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:
40
48
41
49
```sh
42
-
npm link
50
+
nvm use 20
43
51
```
44
52
45
-
Then, go into `docs` and link the package.
53
+
To run the docs site:
46
54
47
55
```sh
48
56
cd docs
49
-
npm link "carbon-components-svelte"
50
-
npm install
57
+
nvm use 20 && npm i && npm run dev
51
58
```
52
59
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).
56
61
57
62
## Development workflow
58
63
@@ -64,14 +69,6 @@ git checkout -b new-feature
64
69
65
70
Preview changes to components from the `src` folder in the documentation website located in `docs/`.
66
71
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
-
75
72
### Component Format
76
73
77
74
Each component should adopt the following structure:
@@ -114,12 +111,12 @@ export {
114
111
} from "./ComposedModal";
115
112
```
116
113
117
-
### Run `npm run build:docs`
114
+
### Run `bun run build:docs`
118
115
119
116
Run the following command to re-generate TypeScript definitions and documentation.
120
117
121
118
```sh
122
-
npm run build:docs
119
+
bun run build:docs
123
120
```
124
121
125
122
## Submit a Pull Request
@@ -150,11 +147,11 @@ The workflow is automatically triggered when pushing a tag that begins with `v`
150
147
151
148
However, maintainers must perform a few things in preparation for a release.
152
149
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:
154
151
155
152
- Bump the semantic version in `package.json`
156
153
- 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
158
155
159
156
This command will not create a commit nor tag. Afterwards, perform the following manually:
0 commit comments