an-example-react-package-built-with-nextjs-tooling
TypeScript icon, indicating that this package has built-in type declarations

0.8.0 • Public • Published

Ultimate react package template

A template for creating and publishing open source React packages.

Feel free to open pull requests against this repository!

A good way to see how everything is behaving, is to update the component package yourself and raise a pull request.

I'll merge anything that isn't too crazy, and adheres to the versioning strategy.

Features

  • Branch deploys to Netlify
  • Tests with Storybook
  • Release management with changesets
    • PRs will be prompted to provide a changeset
    • On successful merge to main, a prerelease package will be published
    • On successful merge to main, a release PR will automatically be created

Instructions

  • Fork/clone the repo.
  • Update package.json:
    • Change the author details
    • Change the package name
    • Change the repository details
  • Update LICENSE:
    • Change the copyright name
  • Log in to Netlify, create new project and add your repository
  • In Github, set NETLIFY_SITE_ID as a repository variable, and NETLIFY_TOKEN as a repository secret.
  • In Github, set the NPM_TOKEN repository secret
  • Install the changeset-bot to your repository

Notes

  • I would prefer to deploy to Github pages, but branch deploys are not supported.

  • Currently the behaviour is that merging to master will update the 'master docs' (ie. the published docs people will see in regular use), create a prerelease package, and create a release PR.

    • This means that until the release PR is merged, your master docs will be ahead of what's actually in the published package.
    • I'm working on this, basically I need a way of getting Netlify to only publish the main branch if it has a release tag. Related discussion: https://answers.netlify.com/t/deploy-on-git-tags-only/43759

To come

  • Automated documentation generation

Readme

Keywords

none

Package Sidebar

Install

npm i an-example-react-package-built-with-nextjs-tooling

Weekly Downloads

386

Version

0.8.0

License

MIT

Unpacked Size

45.7 kB

Total Files

9

Last publish

Collaborators

  • davidblacksheep