{"action":"created","issue":{"url":"https://api.github.com/repos/gulpjs/gulp/issues/1823","repository_url":"https://api.github.com/repos/gulpjs/gulp","labels_url":"https://api.github.com/repos/gulpjs/gulp/issues/1823/labels{/name}","comments_url":"https://api.github.com/repos/gulpjs/gulp/issues/1823/comments","events_url":"https://api.github.com/repos/gulpjs/gulp/issues/1823/events","html_url":"https://github.com/gulpjs/gulp/issues/1823","id":180513261,"number":1823,"title":"gulpfile.babel.js not used if parent directory has a gulpfile.js","user":{"login":"nrser","id":207603,"avatar_url":"https://avatars.githubusercontent.com/u/207603?v=3","gravatar_id":"","url":"https://api.github.com/users/nrser","html_url":"https://github.com/nrser","followers_url":"https://api.github.com/users/nrser/followers","following_url":"https://api.github.com/users/nrser/following{/other_user}","gists_url":"https://api.github.com/users/nrser/gists{/gist_id}","starred_url":"https://api.github.com/users/nrser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrser/subscriptions","organizations_url":"https://api.github.com/users/nrser/orgs","repos_url":"https://api.github.com/users/nrser/repos","events_url":"https://api.github.com/users/nrser/events{/privacy}","received_events_url":"https://api.github.com/users/nrser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-02T13:51:33Z","updated_at":"2016-10-05T00:40:55Z","closed_at":null,"body":"**What were you expecting to happen?**\r\n\r\nfor directory structure like\r\n\r\n```\r\nproject-dir/\r\n    submodules/\r\n       my-module/\r\n           gulpfile.babel.js\r\n    gulpfile.js\r\n```\r\n\r\nwhen i run `gulp` in the `project-dir/submodules/my-module` directory i expected it to use `project-dir/submodules/my-module/gulpfile.babel.js`.\r\n\r\n**What actually happened?**\r\n\r\nit uses `project_dir/gulpfile.js`.\r\n\r\nif i change the name of `project-dir/gulpfile.js` to `project-dir/gulpfile.babel.js` it works as expected.\r\n\r\n(as the example directory structure suggests, this problem cropped up when changing a submodule in a project to use `gulpfile.babel.js` while the main repo was still using `gulpfile.js`)\r\n\r\n**Please post a sample of your gulpfile (preferably reduced to just the bit that's not working)**\r\n\r\nit doesn't matter what's in the `gulpfile`. you can reproduce via: \r\n\r\n```\r\nmkdir project-dir\r\ncd project-dir\r\nnpm init -y\r\nnpm install --save-dev gulp\r\ntouch gulpfile.js\r\nmkdir -p submodules/my-module\r\ncd submodules/my-module\r\nnpm init -y\r\nnpm install --save-dev gulp babel-register\r\ntouch gulpfile.babel.js\r\ngulp -T\r\n```\r\n\r\noutput shows gulp walking up the directory tree to `gulpfile.js`:\r\n\r\n```\r\n[21:49:03] Working directory changed to /private/tmp/project-dir\r\n[21:49:03] Using gulpfile /private/tmp/project-dir/gulpfile.js\r\n[21:49:04] Tasks for /private/tmp/project-dir/gulpfile.js\r\n```\r\n\r\nthen if you\r\n\r\n```\r\nmv ../../gulpfile.js ../../gulpfile.babel.js\r\ngulp -T\r\n```\r\n\r\nyou'll see it use the correct file:\r\n\r\n```\r\n[21:50:08] Requiring external module babel-register\r\n[21:50:08] Using gulpfile /private/tmp/project-dir/submodules/my-module/gulpfile.babel.js\r\n[21:50:08] Tasks for /private/tmp/project-dir/submodules/my-module/gulpfile.babel.js\r\n```\r\n\r\n**What version of gulp are you using?**\r\n\r\n```\r\n$ gulp --version\r\n[21:36:13] Requiring external module babel-register\r\n[21:36:13] CLI version 3.9.1\r\n[21:36:13] Local version 3.9.1\r\n```\r\n\r\n**What versions of npm and node are you using?**\r\n\r\n```\r\n$ npm --version\r\n3.10.3\r\n\r\n$ node --version\r\nv6.6.0\r\n```"},"comment":{"url":"https://api.github.com/repos/gulpjs/gulp/issues/comments/251553451","html_url":"https://github.com/gulpjs/gulp/issues/1823#issuecomment-251553451","issue_url":"https://api.github.com/repos/gulpjs/gulp/issues/1823","id":251553451,"user":{"login":"phated","id":992373,"avatar_url":"https://avatars.githubusercontent.com/u/992373?v=3","gravatar_id":"","url":"https://api.github.com/users/phated","html_url":"https://github.com/phated","followers_url":"https://api.github.com/users/phated/followers","following_url":"https://api.github.com/users/phated/following{/other_user}","gists_url":"https://api.github.com/users/phated/gists{/gist_id}","starred_url":"https://api.github.com/users/phated/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phated/subscriptions","organizations_url":"https://api.github.com/users/phated/orgs","repos_url":"https://api.github.com/users/phated/repos","events_url":"https://api.github.com/users/phated/events{/privacy}","received_events_url":"https://api.github.com/users/phated/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T00:40:55Z","updated_at":"2016-10-05T00:40:55Z","body":"@jonschlinkert I'm not opposed to that solution but I'm pretty sure this was another bug introduced by the findup-sync refactor. The PR you are referring to was a new feature, unrelated to this. "}}
{"actor":{"display_login":"phated"}}