For MacOS, prerequisites include Node.js and Bun.
Fork the repository and clone your fork:
git clone <YOUR_FORK>
cd carbon-preprocess-svelte
Set the original repository as the upstream:
git remote add upstream git@github.com:carbon-design-system/carbon-preprocess-svelte.git
# verify that the upstream is added
git remote -v
Finally, install the project dependencies:
bun install
Imports for carbon-components-svelte
must be regenerated if the carbon-components-svelte
package is updated.
To update the imports, run the following command:
bun run index:components
This will update src/component-index.ts
, which should be checked into source control.
Run bun test
to execute the unit tests (located in /tests
).
For watch mode, run bun test --watch
.
To update snapshots, run bun test --update-snapshots
.
Before submitting a pull request, make sure your fork is up to date with the latest upstream changes.
git fetch upstream
git checkout main
git merge upstream/main
After you've pushed your changes to remote, submit your PR. Make sure you are comparing <YOUR_USER_ID>/feature
to origin/main
.