How to publish
- Rename the package name in package.json
- Create a git in the library
- Login npm in CLI
- Run
npm version patch
to increment version number - Publish to shawtickets
npm i
npm login
git commit -m ""
npm version patch
npm run build
npm publish --access public
Set up typescript
We write typescript but publish javasript to NPM after transpire.
tsc --init
npm install typescript del-cli --save-dev
npm install express \
express-validator \
cookie-session \
jsonwebtoken \
http-status-codes \
@types/cookie-session \
@types/express \
@types/jsonwebtoken
Patch
The steps can be condensed into "pub" script in package.json.
git add .
git commit -m "Some message"
npm version patch
npm run build
npm publish
Short-hand: npm run pub