measure-tech-debt

1.1.3 • Public • Published

measure-tech-debt measures a folder's tech debt according to:

  • imports (e.g. handlebars, coffeescript)
  • identifiers (e.g. $)
  • file extensions (e.g. .hbs, coffee)

It's secret sauce is tsquery.

See it on NPM! License

Install

npm install -y -g measure-tech-debt

Single folder

npx measure-tech-debt .

Multiple folders

npx measure-tech-debt *

Output to JSON (default)

npx measure-tech-debt * --json
npx measure-tech-debt * --json > techdebt.json
[{"path":".","jquery imports":41,"underscore imports":10,"coffee imports":2,"handlebars imports":3,"hbs imports":0,"$ identifiers":110,".coffee extension":1,".hbs extension":0,".handlebars extension":2}]

Output of Pretty JSON

npx measure-tech-debt . --json | python -m json.tool
[
  {
    "path": ".",
    "jquery imports": 41,
    "underscore imports": 10,
    "coffee imports": 2,
    "handlebars imports": 3,
    "hbs imports": 0,
    "$ identifiers": 110,
    ".coffee extension": 1,
    ".hbs extension": 0,
    ".handlebars extension": 2
  }
]

Output to CSV

npx measure-tech-debt * --csv
npx measure-tech-debt * --csv > techdebt.csv
path,jquery imports,underscore imports,coffee imports,handlebars imports,hbs imports,$ identifiers,.coffee extension,.hbs extension,.handlebars extension
.,41,10,2,3,0,110,1,0,2%

Readme

Keywords

Package Sidebar

Install

npm i measure-tech-debt

Weekly Downloads

1

Version

1.1.3

License

MIT

Unpacked Size

7.2 kB

Total Files

6

Last publish

Collaborators

  • aaronshaf