1.0.4 • Published 3 years ago

@madeitarchi/common v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

#Common libray

1) Create Organisation

Into https://www.npmjs.com/ signin or signup and then create an organisation (top right corner). It has to be a unique name.

1) init npm

npm init

1) Add scripts inside package.json :

    "clean": "del ./build/*",
    "build": "npm run clean && tsc",

Warning: package name has to be the @/common

1) init Typescript:

npx tsc --init

1) Init git:

git init

create .gitignore file and add node_modules and build folder

add and commit all

git add .
git commit -m "Initial Commit"

1) Publish it to validate the functioning:

npm publish --access public

warning: if there is an error you have to login

 npm login
npm notice Log in on https://registry.npmjs.org/
Username: ****
Password: ****
Email: (this IS public) ****

1) Add another script to help publish easily:

"pub": "git add . && git commit -m \"Updates\" && npm version patch && npm run build && npm publish"

1) Create src:

src
-- index.ts   (import all files here => export * from './errors/r...';)
-- folders (middlewares, errors, ...)