Due to some interest of this tool I've took a look in my code and I think it can be written in better way.
Rewrite code to be faster and more focused:
remove ts-morph dependency, rely only on Typescript APIs
don't count all usages of given class, check if it has any relevant usage (if even one usage is found then return true, process less files, should be faster)
tool should do what it's name says, nothing more - found Angular classes that have no relevant usages in other files, therefore it should return only list of class names with their source files
when looking usages by selector only look in relevant files (currently is filtering all files)
Improve cli:
use some library for cli interface (probably cac)
add flag for spec file pattern (default *.spec.ts)
add --ci flag to skip progress in output (or flags for human readable and machine readable output)
consider adding flags for --components, --pipes, --directives, --injectables
Due to some interest of this tool I've took a look in my code and I think it can be written in better way.
Rewrite code to be faster and more focused:
ts-morph
dependency, rely only on Typescript APIsImprove cli:
Fix errors reported by community