npm-github-starter v0.1.0
React Library Starter
Starter template for your next react typescript library. Complete with changeset, tsup, and tailwind with prettier-plugin. Publish to npm the right and easy way.
Setup
- Go to npm and create your access token with type of "Publish" or "Automation". Copy the token.
- Go to your repo, click on "Settings" => "Secrets and variables" => "Actions" => "New repository secret" then create token named "NPM_TOKEN" and paste token from step 1.
- Go to your repo, click on "Settings" => "Actions" => "General" then make sure Workflow permissions is set to "Read and write permissions" and check "Allow Github Actions to create and approve pull requests."
How to use
Create your package in package/index. Then import and test from src/App.
Run pnpm changeset
then push to your Github and workflow will create a PR for you to merge. Once you merge, your package will be automatically published to npm.
Or run pnpm release
to publish directly from your command line. Remember to login with npm login
and update version property in package.json.
Video tutorial from Matt Pocock
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago