grunt icon indicating copy to clipboard operation
grunt copied to clipboard

Case sensitive parameters

Open Therealskythe opened this issue 6 years ago • 1 comments

When passing files to a task like src: ['**/*.{png,jpg,gif,svg}'], it will ignore all files that don't match the case. Like all files that end with JPG in this example.

There seems to be NO mention of case sensitivity in the documentation at all, but it says:

For more on glob pattern syntax, see the node-glob and minimatch documentation

Now, the example above doesnt seem to be either of those, right? I don't define any globs or minimatches. Are there options for what I am doing? Do I have to switch to Node Glob notation because that comes with a nocase option...?

Do I really have to write all file extensions twice? Am I missing something?

Therealskythe avatar Jun 12 '19 10:06 Therealskythe

Now, the example above doesnt seem to be either of those, right?

The documentation is correct in saying that file-related tasks, expand your src patterns by using node-glob and minimatch. In your case, I believe, node-glob is most relevant.

In grunt/task.js, src is expanded using grunt.file.expand from https://github.com/gruntjs/grunt/blob/v1.6.1/lib/grunt/file.js. This in turn uses file.glob.sync which comes from node-glob.

https://github.com/isaacs/node-glob documents an option nocase that may want to try.

Krinkle avatar Jun 11 '24 20:06 Krinkle