gruntjs / gruntjs/grunt

Warn when set cwd without expand

Open
#917 0 comments 0 reactions 0 assignees View on GitHub
Type: Enhancement
Dominant language
JavaScript
Stars
12.2k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

From [document](http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically)

> "Set expand to true to enable the following options:"

But if I set files like

```
{
files: {
cwd: 'src',
src: '*.js',
dest: 'dist'
}
}
```

The result is wrong without any warn. If it is nessesry to use cwd with expand, then it shoud be restricted.

Contributor guide

Open the contributing guide

Research direction

Start with the linked configuring-tasks documentation and reproduce the shown files configuration using cwd without expand. Trace how that configuration is handled and determine whether it should warn or be rejected; done means the invalid combination no longer silently produces the wrong result.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Bug
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.