I have app folder and under that number of modules and components. I need to count only .ts files lines of code. So is there any plugin for VS Code or any other way please suggest?
You can use the command-line tool CLOC (Count Lines of Code).
Installation :
npm install -g cloc
Usage :
cloc my/app/folder --include-lang=TypeScript
You will get an output looking like this :
88 text files.
88 unique files.
32 files ignored.
github.com/AlDanial/cloc v 1.82 T=0.12 s (516.3 files/s, 19421.4 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
TypeScript 60 276 101 1880
-------------------------------------------------------------------------------
SUM: 60 276 101 1880
-------------------------------------------------------------------------------
More info
On Unix you can use wc
to count the number of lines of documents.
wc -l **/*.ts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With