1.0.7 • Published 3 years ago

ts-npm-starter v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

ts-npm-starter $ npx startmeup supported

Self-publishing Typescript NPM package starter

Features

✓ Auto publish to NPM - Powered by Github actions
✓ Typescript - Build with confidence
✓ Jest - Don't guess, test

Get it!

$ npx startmeup ts-npm-starter [local-folder]

Setup

  • yarn / npm install
  • Add your username & email in .github/workflows/publish-to-npm.yml
  • Set package name & description in package.json
  • Set NPM_TOKEN in Repository Settings > Secrets > "Action Secrets" (see below)

Adding your NPM Automation Token

To authenticate the publish-to-npm.yml Github Actions workflow, you will need to setup a NPM access token in two easy steps:

Step #1 - Get a NPM publish token

  • Login to npmjs.com
  • Go to Access Token > Create New Access Token
  • Select an "Automation" token, then press Generate Token
  • Store the token somewhere! (for the second step - it's only displayed once!)

Screenshot 2021-06-10 at 07 21 57

Step #2 - Add NPM token as "NPM_TOKEN" secret

  • Go to repository settings on Github (where you push your package's code to)
  • Go to Settings (repository) > Secrets > New repository secret
  • Add your NPM publish token (from Step #1) as NPM_TOKEN:

image

Development

yarn watch / npm run watch

Test

yarn test / npm run test

Publish to NPM

Push a commit to main branch - .github/workflows/publish-to-npm.yml will automatically publish a new patch version to NPM.

Node Version

tsconfig.json is setup to work with Node v12 (supported on AWS Lambda)

License

MIT

1.0.7

3 years ago

1.0.6

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago