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.
npm install -y -g measure-tech-debt
npx measure-tech-debt .
npx measure-tech-debt *
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}]
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
}
]
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%