Skip to content

Latest commit

 

History

History
79 lines (51 loc) · 2.6 KB

CONTRIBUTING.md

File metadata and controls

79 lines (51 loc) · 2.6 KB

Contributing

This project uses semantic commits and semver.

To get started, make sure you have Node and Yarn 1 (newer versions of Yarn do not work) installed. Install dependencies with:

yarn

Preconstruct will automatically build and link packages for local development via symlinks. If you ever need to do this manually, try running:

yarn dev

Note: Some Windows users may need to enable developer mode if experiencing EPERM: operation not permitted, symlink with Preconstruct. If this persists, you might be running on an unsupported drive/format. In which case, consider using Docker.

Development

Locally run examples against the library with:

yarn examples

Testing

Run test suites against the library with:

yarn test

# or, to test live against changes
yarn test:watch

If your code invalidates a snapshot, you can update it with:

yarn test -u

Note: Use discretion when updating snapshots, as they represent the integrity of the package.

If the difference is complex or you're unsure of the changes, leave it for review and we'll unblock it.

Publishing

We use atlassian/changesets to publish our packages, which will automatically document and version changes.

To publish a release on NPM, run the following and complete the dialog (see FAQ):

# Describe the changes you've made as you would semantic commits for CHANGELOG.md
yarn changeset:add

# Tag which packages should receive an update and be published.
yarn vers

# Commit and publish changes to NPM.
yarn release

We don't have automatic CI deployments yet, so make sure to create a release on GitHub to notify people when it's ready. Choose or create the version generated by your changeset, and you can leave the rest to auto-fill via the "Generate release notes" button to describe PRs since the last release.

Prerelease

Follow the same steps as before, but specify a tag for prerelease mode with:

yarn changeset pre enter <alpha | beta | rc>

To cancel or leave prerelease mode, try running:

yarn changeset pre exit