1.0.14 • Published 5 years ago
@gagan-personal/common v1.0.14
Custom npm package
Description
- Common Authorization code
- Imported via package.json
- Wrrten in typescript, however porduction code is converted in Javascript
Login to npm
npm login
- Enter username and password
Steps to Publish
- Makre sure you are logged In
git init
- Commit your files
- Publish package
npm publish --access public
Dependencies
Production --save
@types/cookie-session
@types/express
@types/jsonwebtoken
cookie-session
express
express-validator
jsonwebtoken
node-nats-streaming
Dev --save-dev
typescript
del-cli
- Allows cleaning build riectory before every build
Exporting libraries
- Update package.json with target source code
{
"main": "./build/index.js",
"types": "./build/index.d.ts",
"files": [
"./build/**/*"
]
}
Creating a patch upgrade (Bugfixes)
npm version patch
- Must be executed everytime we publsh an upgrade
Steps
npm version patch
npm run build
npm publish
NOTE
- Always make sure a new build is published using
npm run publish
after making any changes - Other microservices use this library as a
npm package