gruntjs / gruntjs/grunt

files object multiple files - how to make it case insensitive

Open
#1,339 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.2k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

I have written below target,

``` js
commonUtils: {
options: {
separator: ';'
},
files: [{
'<%= pkg.dest %>/components/common/commonutils.js': ['<%= pkg.dest %>/Common/JS/Utils/**/*.js', '! <%= pkg.dest %>/Common/JS/Utils/**/Test/**/*']
}]
},
```

For src I have mentioned two glob patterns out of which second added to not to select files from Test. After testing I get to know if folder name is 'test', in that case grunt is going ahead and picking files from that folder. Any suggestions to make above target case insensitive would be appreciated.

Updated:
If I put nocase:true like below, it gives error, doesn't load the task.

``` js
files: [{
nocase:true,
'<%= pkg.dest %>/components/common/commonutils.js': ['<%= pkg.dest %>/Common/JS/Utils/**/*.js', '! <%= pkg.dest %>/Common/JS/Utils/**/Test/**/*']
}]

```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the shown Grunt target with the two glob patterns, including a lowercase test directory and the attempted nocase option. Trace how the files object is parsed and how glob exclusions are matched. Done means the target can exclude the test directory regardless of its case, with a valid configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.