{"action":"closed","issue":{"url":"https://api.github.com/repos/sdepold/gulp-busterjs/issues/5","labels_url":"https://api.github.com/repos/sdepold/gulp-busterjs/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/sdepold/gulp-busterjs/issues/5/comments","events_url":"https://api.github.com/repos/sdepold/gulp-busterjs/issues/5/events","html_url":"https://github.com/sdepold/gulp-busterjs/issues/5","id":55423582,"number":5,"title":"Delete Config File?","user":{"login":"trisys3","id":5612942,"avatar_url":"https://avatars.githubusercontent.com/u/5612942?v=3","gravatar_id":"","url":"https://api.github.com/users/trisys3","html_url":"https://github.com/trisys3","followers_url":"https://api.github.com/users/trisys3/followers","following_url":"https://api.github.com/users/trisys3/following{/other_user}","gists_url":"https://api.github.com/users/trisys3/gists{/gist_id}","starred_url":"https://api.github.com/users/trisys3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trisys3/subscriptions","organizations_url":"https://api.github.com/users/trisys3/orgs","repos_url":"https://api.github.com/users/trisys3/repos","events_url":"https://api.github.com/users/trisys3/events{/privacy}","received_events_url":"https://api.github.com/users/trisys3/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-25T18:05:07Z","updated_at":"2015-01-25T18:09:46Z","closed_at":"2015-01-25T18:09:46Z","body":"I was recently going through this task's code and, while I'm not a master of Node by any means, I noticed it deletes a config file if it finds any in the current folder before it generates a new one. Now, my first question is: do we even need to delete this file? Gulp operates on streams, which means you don't need to do operations on actual files, but rather on the virtual `vinyl-fs` provided. Therefore, unless we were explicitly creating a new config file and adding it in (which we aren't), we shouldn't need to delete the old one.\r\n\r\nWe could even delete the config file in the `vinyl-fs` and generate a new one, but not \"commit\" this operation to the filesystem. We shouldn't even need to do this, however, because we could just generate a new one in vinyl and not even touch the filesystem.\r\n\r\nA better way seems to be to take the options in the repo's current config file into the stream, then merge in some options we provide, deleting any that conflict. This way, we take into account the user's config file, not assuming anything, then merge the options the user provided in the task, then provide defaults if any options are still missing\r\n\r\nI am not worried about my buster file being deleted, by the way, as it is in a subfolder, and I have my repo on git anyway. I am worried about any task that deletes my files without me telling it to, however, as, even if I know what it deletes now, if it updates it could pull a fast one before I realize what it's done. I am not suggesting this is what I think of this task, merely suggesting that this is what other users may think."}}