Skip to content

kotarella1110/typescript-react-hooks-starter

Repository files navigation

TypeScript React Hooks Starter

React Hooks template for building with TypeScript

License Actions Status Semantic Release Commitizen friendly All Contributors PRs Welcome

Want to publish your Custom Hook to npm?

1. Set a secret in an environment variable

The authentication token/credentials have to be made available in the CI service via environment variables. For more information, see "Authentication for plugins".

2. Create Release workflow

# .github/workflows/release.yml
name: Release
on:
  push:
    branches:
      - "[0-9]+.x"
      - "[0-9]+.[0-9]+.x"
      - master
      - next
      - next-major
      - beta
      - alpha
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 12.x
      - name: Install dependencies
        run: npm ci
      - name: Lint
        run: |
          npm run lint:types
          npm run lint
      - name: Test
        run: npm test
        env:
          CI: true
      - name: Build
        run: npm run build
      - name: Release
        run: npm run release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

3. Push a new commit to a master branch

npm run cz
git push origin master

Contributing

Contributions are always welcome! Please read the contributing first.

Contributors

Thanks goes to these wonderful people (emoji key):


Kotaro Sugawara

💻 📖 🤔 🚇 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © Kotaro Sugawara

About

React Hooks template for building with TypeScript

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published