0.0.3 • Published 4 years ago
@ridesz/usual-unused-exports-checker v0.0.3
@ridesz/usual-unused-exports-checker
The typical unused exports checking config I use for my TypeScript projects.
How to use
package.json setup
Just please add this scripts tag part to your package.json file too:
{
"test:exports": "npx @ridesz/usual-unused-exports-checker",
}GitLab CI config
Please add the necessary parts to your .gitlab-ci.yml file:
image: node:latest
stages:
- test
exports:
stage: test
artifacts:
paths:
- build/
expire_in: 1 week
when: always
script:
- npm install
- npm rebuild
- npm run test:exportsThis would use the latest node image and do the unused exports check as part of the test stage.
Running manually
If you would like to run the unused exports check manually then you can use the following command:
npm run test:exportsSome implementation details
The checker skips the unused exports in the src/index.ts file.