$ npm install -g cloc
#可以排除文件夹
$ cloc ./ --exclude-dir=node_modules
$ cloc .
2193 text files.
1533 unique files.
760 files ignored.
github.com/AlDanial/cloc v 1.78 T=4.64 s (309.6 files/s, 57116.0 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
JSP 439 7357 8006 94418
Java 397 7799 21382 45803
JavaScript 89 457 977 35457
CSS 134 115 49 24158
XML 363 252 314 10277
SQL 5 432 35 6422
LESS 2 22 20 584
Maven 2 16 24 440
Bourne Shell 1 0 1 33
HTML 2 5 0 29
Dockerfile 1 2 3 10
Markdown 1 2 0 3
-------------------------------------------------------------------------------
SUM: 1436 16459 30811 217634
-------------------------------------------------------------------------------