1.1.3 • Published 2 years ago
measure-tech-debt v1.1.3
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.
Install
npm install -y -g measure-tech-debtSingle 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.csvpath,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%