Want to create your own NPM packages? Here is a boilerplate setup with typescript and github actions to help you get started!
- Clone this project
- yarn or npm install
- update the name field in package.json with your desired package name
- update the homepage field in package.json
- Add your code
- Follow below instructions to setup automated publish to NPM
The publish workflow yaml has already been setup for you. You will need to setup a few additional step to have it automatically publish to NPM as a package everytime you merge into master.
- Get your secret key from NPM
- Setup secrets on github using NPM_TOKEN as name
For development only dependencies, make sure you add them into the devDepdencies section of the package.json
yarn add --dev @types/mocha mocha
npm install --dev @types/mocha mocha
If you need your users to also download the package as a dependency, then remove it from the devDependencies and add it to the dependencies section