ngx-usage
cli tool for analyzing usage of Angular components, pipes, directives, services
What it can do for me?
How does it work?
Using ts-morph
files from project
(provided by tsconfig file) are parsed and usage stats are counted.
Component usages are checked in templates of other components from project and component's class reference in other files from project.
Component is considered unused when it's template is not used and class is referenced only in module (.module.ts) or test (.spec.ts) files.
Usage
Install ngx-usage
globally or use it via npx
.
Usage: ngx-usage [options] [command]
Options:
-p, --project <path> tsconfig file path (required)
-V, --version output the version number
-h, --help display help for command
Commands:
unused-components List components that are probably not used - referenced only in module (*.module.ts) and test (*.spec.ts) files
help [command] display help for command