We're very grateful for outside contributions, as they both improve the robustness of the SDK and help inform how the SDK is being used in real-world applications. Whether the contribution is a minor documentation fix or major feature enhancement, we're always happy to accept changes that adhere to the expectations in this document.
Please note that this project adheres to a code of conduct.
Please follow the provided template when submitting an issue.
Please follow the provided template when submitting a pull request.
The SDK codebase is written using modern JavaScript language features and is statically-typed using Flow. The commands below (and repository as a whole) use Yarn, but both Yarn and NPM can be used interchangeably depending on developer preference.
Fork and clone the repository:
$ git clone https://github.com/<username>/abstract-sdk
Install dependencies from the project root using Yarn:
$ cd abstract-sdk && yarn
Type-check all code using Flow:
$ yarn flow
Transpile the src
directory into a dist
directory using Babel:
$ yarn build
Lint and format all code using Prettier via ESLint:
$ yarn lint --fix
Run unit tests using Jest:
$ yarn test
Both the documentation content and its static website code live inside this repository in the docs
and website
folders, respectively. The documentation auto-deploys to https://developer.abstract.com whenever new commits occur on the docs
branch. This means that pull requests to update documentation should be made against the docs
branch instead of master
.
Install dependencies from the /website
folder using Yarn:
$ cd website && yarn
Serve the documentation site at http://localhost:3000:
$ yarn start
New package versions of abstract-sdk
are automatically published to the public NPM registry whenever new tags are pushed to the repository. This repository uses standard-version
as convention to automate versioning, tagging, and changelog generation:
- Bump the version and submit a pull request. For a prerelease, add the
--prerelease
flag when runningyarn release
:$ yarn release $ git push origin <new_tag_version>
- Once the PR lands, push the new tag to the repository.
$ git push origin <new_tag_version>
- Lastly, update the documentation.
$ git checkout -t origin/docs -b docs $ git rebase master $ git push origin docs -f