admin 管理员组

文章数量: 1086019

I am looking for a way to count the total number of line of code for my front-end project.

At the moment I am using the gulp-sloc

gulp.task('sloc', function () {
    gulp.src(folders)
      .pipe(sloc());
});

But the CSS code is not included in the count.

  • Do I miss some special configuration?
  • Do you know any other similar plugin?

I am looking for a way to count the total number of line of code for my front-end project.

At the moment I am using the gulp-sloc

gulp.task('sloc', function () {
    gulp.src(folders)
      .pipe(sloc());
});

But the CSS code is not included in the count.

  • Do I miss some special configuration?
  • Do you know any other similar plugin?
Share Improve this question asked Nov 18, 2015 at 7:46 GibboKGibboK 74k148 gold badges451 silver badges674 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

Perhaps you are using source control? In case that source control is Git, you can count the amount of code in the repo like this – no extra tools required.

For a more detailed breakdown, cloc may be helpful – have a look at this answer then. cloc doesn't depend on Git, or any other type of source control.

In windows OS there is also a gui tool http://www.locmetrics./ which you can use to count lines of code (LOC), blank lines of code (BLOC), ment lines of code (CLOC).

本文标签:

Error[2]: Invalid argument supplied for foreach(), File: /www/wwwroot/roclinux.cn/tmp/view_template_quzhiwa_htm_read.htm, Line: 58
File: /www/wwwroot/roclinux.cn/tmp/route_read.php, Line: 205, include(/www/wwwroot/roclinux.cn/tmp/view_template_quzhiwa_htm_read.htm)
File: /www/wwwroot/roclinux.cn/tmp/index.inc.php, Line: 129, include(/www/wwwroot/roclinux.cn/tmp/route_read.php)
File: /www/wwwroot/roclinux.cn/index.php, Line: 29, include(/www/wwwroot/roclinux.cn/tmp/index.inc.php)