my-typescript-library-starter
Advanced tools
Comparing version
{ | ||
"name": "my-typescript-library-starter", | ||
"type": "module", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"packageManager": "pnpm@8.15.3", | ||
@@ -6,0 +6,0 @@ "description": "A boilerplate for starting a TypeScript library, equipped with Vitest + ESLint + Commitizen + Husky + Release-it and generating beautiful change-log with Changelogen", |
@@ -57,2 +57,22 @@ # my-typescript-library-starter | ||
`coverage-v8` is used to obtain coverage metrics. | ||
The test and coverage config file is `vitest.config.ts`. for example to exclude config files in the root of project from coverage analysis, we config `vitest.config.ts` like follow: | ||
```js | ||
import { configDefaults, defineConfig } from 'vitest/config' | ||
export default defineConfig({ | ||
test: { | ||
coverage: { | ||
exclude: [ | ||
...configDefaults.exclude, | ||
'*.config.js', | ||
'*.config.ts', | ||
], | ||
}, | ||
}, | ||
}) | ||
``` | ||
## Release-it for Releasing | ||
@@ -59,0 +79,0 @@ We use `release-it` for version management and publish to anywhere (npm or github). We also use its hooks to execute any command we need to test, build, and publish our project. |
6929
7.53%85
30.77%