Please note we have a Code of Conduct, please follow it in all your interactions with the project.
Contributions are welcome and are greatly appreciated! Every little bit helps, and credit will always be given.
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
- Specific to this package:
- General rules of contribution:
This project uses Rollup as a bundler through TSDX.
To watch this package:
npm run watch # or yarn run watch
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
.
Code quality is set up for you with prettier
, husky
, and lint-staged
.
Jest tests are set up to run with npm test
or yarn test
.
You can also have test coverage with npm run test:coverage
. And rerun test as you work with npm run test:watch
.
size-limit
with npm run size
and visualize the bundle with npm run analyze
.
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');
}
CJS, ESModules, and UMD module formats are supported.
The appropriate paths are configured in package.json
and dist/index.js
accordingly. Please report if any issues are found.
Per Palmer Group guidelines, always use named exports..