Skip to content

Latest commit

 

History

History
64 lines (40 loc) · 1.29 KB

CONTRIBUTING.md

File metadata and controls

64 lines (40 loc) · 1.29 KB

Contributing

Prerequisites

For MacOS, prerequisites include Node.js and Bun.

Set-up

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

Workflow

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.

Unit tests

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.

Submitting a Pull Request

Sync Your Fork

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

Submit a PR

After you've pushed your changes to remote, submit your PR. Make sure you are comparing <YOUR_USER_ID>/feature to origin/main.