React component library boilerplate, created using rollup and typescript.
- Simply clone this repo and start coding!
yarn buildCompile the code using RollupJS
yarn testTest the code using react-testing-library and Jest
yarn storybookPreview your components using StorybookJS
yarn lintLint using ESLint
yarn cleanCleans `dist` directory and replaces it with an empty folder (used by build script)
-
Only allow squash merging of pull requests
-
Create npm token using
npm token createor https://www.npmjs.com/settings -
Add token to repo secrets as
NPM_TOKEN -
Add release workflow file to
.github/workflows/release.ymlname: Release npm package on: push: branches: - master jobs: release: name: Release runs-on: ubuntu-latest steps: - uses: actions/checkout@master - uses: actions/setup-node@v1 with: node-version: "12.x" - run: yarn install --frozen-lockfile - run: yarn build --if-present - run: yarn test - run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
-
Set
versionto0.0.0-developmentin package.json -
Install
semantic-releaseas a dev dependency:yarn -D semantic-releaseWatch Zeke Sikelianos's demo at https://www.youtube.com/watch?v=rCXq86FOlzQ for a more detailed explanination
👤 Wise Introvert
- Twitter: @wise__introvert
- Github: @wise-introvert
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
