React primitives to quickly build complex form behaviors
yarn add -E react-next-form immer
npm install # or yarn
If you are making changes to the documentation site, install docs dependencies:
cd docs; npm install # or cd docs; yarn
Based on the contribution, format your commit message this way so that the version is correctly bumped:
- If the contribution is a breaking change, put
BREAKING CHANGE
ormajor
somewhere in your commit. - If the contribution is a new feature format your message like this "
feat
: added this new cool stuff". You can also useminor
orfeature
- All other changes will increment the patch version
In case you might want to skip version bumping just add [skip ci]
to your commit.
To publish a new version to npm, just create a Github release. Once you create the release a Github workflow will take care of the publishing process.
The recommended workflow is to run TSDX in one terminal:
npm start # or yarn start
This builds to /dist
and runs the project in watch mode so any edits you save inside src
causes a rebuild to /dist
.
To do a one-off build, use npm run build
or yarn build
.
To run tests, use npm test
or yarn test
.
To run docs use npm run docs
or yarn docs
.
Please see the main tsdx
optimizations docs. In particular, know that you can take advantage of development-only optimizations:
// ./types/index.d.ts
declare var __DEV__: boolean;
// inside your code...
if (__DEV__) {
console.log("foo");
}
You can also choose to install and use invariant and warning functions.
The documentation website is on the documentation
branch. To deploy a new version of the website, simply push to that branch, or merge a pull request to that branch.