Skip to content
/ npm-package Public template

A boilerplate code for an NPM package using typescript.

Notifications You must be signed in to change notification settings

YairLevi/npm-package

Repository files navigation

NPM Package Template

drawing

This is a template for creating a typescript package and publishing it on NPM, utilizing GitHub Actions and changesets as an easy CI/CD pipeline.

Prerequisites

NPM Account and access token -

  • Go to the NPM website and create an account.
  • Go to "Access Tokens" and create a Classic Token, with Automation permissions.
  • Go to your package repository, and add that token as a secret, under the name "NPM_TOKEN"

Git - To use changesets during your development, you must have Git installed on your computer.

NodeJS and NPM - Don't forget to have Node installed with NPM. You can change the workflows in the .github/workflows folder if you have another package manager.


Usage

After making any amount of changes, run npx changeset and create a changeset (This is just a markdown file describing the changes you made.)

When changes are being applied to the main branch, changeset will create a PR for versioning only! Approve that PR, and it will automatically publish to NPM.

For more information, go to the main changesets docs.

About

A boilerplate code for an NPM package using typescript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published