rhiokim / grunt-sloc

Source line of codes plugin for Grunt.js
MIT License
23 stars 12 forks source link

All 0s in generated JSON file #23

Open timdwilson opened 8 years ago

timdwilson commented 8 years ago

When I run the following command:

                jformDistJson: {
                    options: {
                        reportType: 'json',
                        reportPath: '../doc/sloc/jform-dist-sloc-<%= pkg.version %>.json',
                    },
                    files: {
                        '../js': ['jForm/*.js']
                    }
                }

It produces this output:

Running "sloc:jformDistJson" (sloc) task
Create at: ../doc/sloc/jform-dist-sloc-1.7.1.json

Done, without errors.

I get all 0s in the JSON output:

{
  "total": 0,
  "source": 0,
  "comment": 0,
  "single": 0,
  "mixed": 0,
  "empty": 0,
  "block": 0,
  "file": 0
}

I am using: Windows 2008 R2 grunt 0.4.5 grunt-sloc 0.7.1 sloc 0.1.10 node.js 4.4.0

This same relative path works in all of my other grunt tasks. In fact, I've tried seemingly every combination of absolute and relative paths and I get the same result. Can you please help?

braver commented 8 years ago

Same here, nothing but zeroes.