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

BREAKING CHANGE: Update files param to handle multiple directories #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

haxxxton
Copy link

'json-minify': {
    build: {
        files: ['../../../foo/**/*.json', '../../../bar/*.json']
    }
},

produces an error
Warning: Cannot use 'in' operator to search for 'src' in ../../../foo/**/*.json Use --force to continue.

it would appear that files is attempting to do something that we dont want. Changing the name to fileList solves this problem.

Currently i can find no documentation for what files is attempting to do, nor can i find a way to backwards compatible-ize as the error is thrown before the task is run.

@mlegenhausen
Copy link

Can you provide a working example? The usage of files should be favoured cause most grunt user know to work with it.

@haxxxton
Copy link
Author

haxxxton commented Aug 30, 2016

Working example would be to switch the noun files for fileList

'json-minify': {
    build: {
        fileList: ['../../../foo/**/*.json', '../../../bar/*.json']
    }
},

I am unsure of why files, when receiving an array of paths, is failing. i agree it would be preferable to stick with files, but im finding that before the json-minify.js task code is even run, grunt throws the above Warning

Warning: Cannot use 'in' operator to search for 'src' in ../../../foo/*/.json Use --force to continue.

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

Successfully merging this pull request may close these issues.

2 participants