rhiokim / grunt-sloc

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

0.7.1 can't seem to get file filters to work using '.' #25

Open Deklin opened 8 years ago

Deklin commented 8 years ago
 sloc: {
                ui: {
                    options: {
                        reportDetail: true,
                    },
                    files: {
                        '.': ['catalogs/src/**/*.*']
                    }
                }
            }

always returns 0 files however if I do

 files: {
'catalogs/src': ['**]
}

this works

what am i missing?

GreenRaccoon23 commented 7 years ago

Did you ever figure this out? I'm having the same issue.

GreenRaccoon23 commented 7 years ago

I've narrowed this down to a configuration issue within grunt itself, when it relies on the minimatch package. But I still don't know how to tell minimatch to "match all files except directories." You'd think * or *.* would do this, but it doesn't.

GreenRaccoon23 commented 7 years ago

I got an answer here for anyone who comes across this. http://stackoverflow.com/questions/41227726/grunt-files-object-format-all-regular-files-files-immediately-under-top-level-d