{"action":"created","issue":{"url":"https://api.github.com/repos/yeoman/generator-node/issues/178","labels_url":"https://api.github.com/repos/yeoman/generator-node/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/yeoman/generator-node/issues/178/comments","events_url":"https://api.github.com/repos/yeoman/generator-node/issues/178/events","html_url":"https://github.com/yeoman/generator-node/pull/178","id":110473714,"number":178,"title":"Clean dist folder of files before running babel","user":{"login":"melonmanchan","id":6872462,"avatar_url":"https://avatars.githubusercontent.com/u/6872462?v=3","gravatar_id":"","url":"https://api.github.com/users/melonmanchan","html_url":"https://github.com/melonmanchan","followers_url":"https://api.github.com/users/melonmanchan/followers","following_url":"https://api.github.com/users/melonmanchan/following{/other_user}","gists_url":"https://api.github.com/users/melonmanchan/gists{/gist_id}","starred_url":"https://api.github.com/users/melonmanchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melonmanchan/subscriptions","organizations_url":"https://api.github.com/users/melonmanchan/orgs","repos_url":"https://api.github.com/users/melonmanchan/repos","events_url":"https://api.github.com/users/melonmanchan/events{/privacy}","received_events_url":"https://api.github.com/users/melonmanchan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-08T15:16:09Z","updated_at":"2015-10-08T18:19:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yeoman/generator-node/pulls/178","html_url":"https://github.com/yeoman/generator-node/pull/178","diff_url":"https://github.com/yeoman/generator-node/pull/178.diff","patch_url":"https://github.com/yeoman/generator-node/pull/178.patch"},"body":"This fixes the issue found in #173 by cleaning the dist folder before prepublishing using the 'del' module, as recommended by: https://github.com/gulpjs/gulp/blob/master/docs/recipes/delete-files-folder.md"},"comment":{"url":"https://api.github.com/repos/yeoman/generator-node/issues/comments/146644045","html_url":"https://github.com/yeoman/generator-node/pull/178#issuecomment-146644045","issue_url":"https://api.github.com/repos/yeoman/generator-node/issues/178","id":146644045,"user":{"login":"melonmanchan","id":6872462,"avatar_url":"https://avatars.githubusercontent.com/u/6872462?v=3","gravatar_id":"","url":"https://api.github.com/users/melonmanchan","html_url":"https://github.com/melonmanchan","followers_url":"https://api.github.com/users/melonmanchan/followers","following_url":"https://api.github.com/users/melonmanchan/following{/other_user}","gists_url":"https://api.github.com/users/melonmanchan/gists{/gist_id}","starred_url":"https://api.github.com/users/melonmanchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melonmanchan/subscriptions","organizations_url":"https://api.github.com/users/melonmanchan/orgs","repos_url":"https://api.github.com/users/melonmanchan/repos","events_url":"https://api.github.com/users/melonmanchan/events{/privacy}","received_events_url":"https://api.github.com/users/melonmanchan/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T18:19:54Z","updated_at":"2015-10-08T18:19:54Z","body":"Yeah, del('dist') also works. Additionally, there exists a race condition between build and clean at the moment, as the dependancy tasks of build are run async, which might not be immediately apparent from Gulp's current syntax. Adding 'clean' as a dependancy should be the way to go, or at least until Gulp 4 is released, which promises to fix that particular pitfall."}}