Inspired by this article
- make new folder:
mrdir project-folder && cd project-folder
- create
README.md
file:echo "# My Awesome Project" >> README.md
- init git repository:
git init
- commit
README.md
file:git add README.md && git commit -m "initial commit"
- create
package.json
:npm init -y
yarn add -D @types/jest \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint \
eslint-config-prettier \
eslint-plugin-prettier \
eslint-plugin-simple-import-sort \
jest \
nodemon \
prettier \
ts-jest \
typescript
"scripts":
{
"build": "tsc",
"test": "jest",
"test:coverage": "jest --coverage --verbose",
"watch": "nodemon --watch src --exec yarn build",
"lint": "eslint --fix --ignore-path .gitignore src && prettier --write --ignore-path .gitignore \"./**/*.json\"",
"prepare": "yarn build",
"prepublishOnly": "yarn lint && yarn test",
"preversion": "yarn lint",
"version": "git add -A",
"postversion": "git push && git push --tags"
}