ignoredFiles is an empty array by default #5

wants to merge 1 commit into from

2 participants


Having ignoredFiles default to an empty array guarantees scrubbing the .nodemonignore file with fresh data every time the task is run. Currently if the user doesn't specify ignoredFiles or comments it out, thinking this will clear it, the .nodemonignore file is left untouched when the task is run.

Change for #4

@darvelo darvelo ignoredFiles is empty by default in case user leaves it unspecified. …
…This guarantees scrubbing the .nodemonignore file with fresh data every time the task is run.


Thanks again for your contributions. Your criticism has been extremely valuable in advancing this project.

I didn't accept this pull request for a few reasons:

  • it creates a .nodemonignore file if the user leaves the ignoredFiles field blank
  • I want to removed the .nodemonignore if the user removes the ignoredFiles field rather than make it blank
  • You provided no tests to verify your new feature worked.
  • You used the options function incorrectly, instead it should be implemented like this:
options = this.options({
  ignoredFiles: []

It takes an object of default values as a parameter.

I welcome further contributions from you, and if you submit a more thorough pull request I would be willing to accept it after discussion. In this case I had to change so much that I implemented it myself: a79f924

@ChrisWren ChrisWren closed this May 3, 2013

Ah, that functionality is better, not least because it leaves a custom .nodemonignore file alone. Well done!

And yep, you're right on all counts. Thanks for teaching me that bit about grunt options, and reminding me about tests. This was my first crack at it, so I guess non-correctness is to be expected. I'll remember to be more thorough in the future. And thanks for being hospitable as well. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment