Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case sensitive parameters #1682

Open
Therealskythe opened this issue Jun 12, 2019 · 1 comment
Open

Case sensitive parameters #1682

Therealskythe opened this issue Jun 12, 2019 · 1 comment
Labels

Comments

@Therealskythe
Copy link

Therealskythe commented Jun 12, 2019

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?

@Krinkle
Copy link
Contributor

Krinkle commented Jun 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants