Standard Shared Config for tagproject
packages with Node.js and TypeScript
Install
npm install @tagproject/ts-package-shared-config --save-dev
Usage
- Add
"prepare:config": "ts-package-shared-config"
toscripts
property in yourpackage.json
- Rename your
prepare
scripts toprepare:[NAME]
- Add
"prepare": "run-s prepare:*"
- Run
npm run prepare
Configs
include shared configs:
extract actions, hooks and configs:
.github/*
.husky/*
.vscode/*
src/__tests__/.eslintrc
src/__tests__/tsconfig.json
.eslintrc
codecov.yml
jest.config.js
tsconfig.json
merge files:
.husky/commit-msg
.vscode/launch.json
.gitignore
.npmignore
tsconfig.json
package.json
:
append to scripts:
-
build
- build shared config -
build:ts
- transpileTS
files -
generate
- run allgenerate:*
-
generate:changelog
- generate changelog -
generate:ghinfo
- generate.ghinfo
file -
lint:eslint
- runeslint
TS files linting -
prepare:config
- rebuild local configs -
prepare:husky
- install husky hooks -
release
- lint, test, generate changelog and bump package version -
test
- run alltest:*
-
test:jest
- runjest
tests
dependencies:
-
@tagproject/docs-shared-config:
3.x
-
@tagproject/vscode-shared-config:
4.x
-
@types/jest:
latest
-
@types/node:
latest
-
@typescript-eslint/eslint-plugin:
7.x
-
@typescript-eslint/parser:
7.x
-
changelog-guru:
5.x
-
eslint:
8.x
-
eslint-config-prettier:
9.x
-
eslint-plugin-import:
2.x
-
eslint-plugin-jest:
27.x
-
eslint-plugin-node:
11.x
-
eslint-plugin-optimize-regex:
1.x
-
eslint-plugin-promise:
6.x
-
ghinfo:
latest
-
husky:
9.x
-
jest:
29.x
-
rimraf:
latest
-
ts-jest:
29.x
-
typescript:
5.x
configure:
{
"exports": "./lib/index.js",
"type": "module",
"types": "./lib/index.d.ts"
}