0.3.0 • Published 3 years ago

ngx-usage v0.3.0

Weekly downloads
91
License
-
Repository
-
Last release
3 years ago

ngx-usage

cli tool for analyzing usage of Angular components, pipes, directives, services

What it can do for me?

  • list components most probably not used in your app
  • x list components
  • list pipes, directives, services most probably not used in your app
  • list pipes,directives, providers usage summary
  • check if anything from imported modules is used in given module files
  • count usages of component/directive/pipe/service from given file in project
  • count usages of any component by selector/class name, i.e. from third party library
  • check if anything from imported modules is used in given module files

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 selector is not used and class is only referenced in imports and Angular modules (declarations,exports,entryComponents); Usages in test files are skipped. Test files are identified by name, default regular expression for test file is /\.spec\.ts$/.

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:
  components-unused             List components that are probably not used - referenced only in module (*.module.ts) and test (*.spec.ts) files
  components-summary [options]  List usage stats of all components defined in project
  help [command]                display help for command
0.3.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.2.2

3 years ago

0.1.0

3 years ago

0.0.1

3 years ago

0.0.2

3 years ago

0.0.1-beta-2

3 years ago

0.0.1-beta-3

3 years ago

0.0.1-beta-1

3 years ago

0.0.1-alpha-02

3 years ago

0.0.1-alpha-01

3 years ago