{"action":"created","issue":{"url":"https://api.github.com/repos/flyjs/fly/issues/216","repository_url":"https://api.github.com/repos/flyjs/fly","labels_url":"https://api.github.com/repos/flyjs/fly/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/flyjs/fly/issues/216/comments","events_url":"https://api.github.com/repos/flyjs/fly/issues/216/events","html_url":"https://github.com/flyjs/fly/issues/216","id":179989157,"number":216,"title":"target structure is not correct when passing `file` as param to task ","user":{"login":"devmondo","id":1266367,"avatar_url":"https://avatars.githubusercontent.com/u/1266367?v=3","gravatar_id":"","url":"https://api.github.com/users/devmondo","html_url":"https://github.com/devmondo","followers_url":"https://api.github.com/users/devmondo/followers","following_url":"https://api.github.com/users/devmondo/following{/other_user}","gists_url":"https://api.github.com/users/devmondo/gists{/gist_id}","starred_url":"https://api.github.com/users/devmondo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devmondo/subscriptions","organizations_url":"https://api.github.com/users/devmondo/orgs","repos_url":"https://api.github.com/users/devmondo/repos","events_url":"https://api.github.com/users/devmondo/events{/privacy}","received_events_url":"https://api.github.com/users/devmondo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flyjs/fly/labels/BUG","name":"BUG","color":"b60205"},{"url":"https://api.github.com/repos/flyjs/fly/labels/NEED%20MORE%20INFO","name":"NEED MORE INFO","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-09-29T08:56:44Z","updated_at":"2016-10-02T00:41:25Z","closed_at":"2016-10-02T00:38:18Z","body":"i hope i am not doing something wrong, \r\n\r\nthis issue #200  was fixed and works perfectly now, but when using fly-babel if you dont pass `file` as param to the task function babel will transpile all files in path.\r\n\r\nAs i understood from the doc [watch](https://github.com/flyjs/fly/blob/master/docs/README.md#flyprototypewatch-globs-tasks-options) `file` should be passed, and it works great now babel only transpile the passed file, but the same problem in the referenced issue above occurs again.\r\n\r\nhere is my code \r\n\r\n```\r\nconst paths = {\r\n    scripts: ['./src/**/*.js']\r\n}\r\n\r\nexport default async function () {\r\n    await this.watch(paths.scripts, `babel`);\r\n}\r\n\r\nexport async function babel(file) {\r\n    await  this.source(file || paths.scripts)\r\n        .babel({\r\n            presets: [[\"es2015\", {\"modules\": false}], \"stage-1\", \"stage-3\"],\r\n            plugins: [\"transform-es2015-modules-commonjs\",\r\n                ['transform-runtime', {\r\n                    \"polyfill\": false,\r\n                    \"regenerator\": true\r\n                }]\r\n            ],\r\n            sourceMaps: true\r\n        })\r\n        .target(`./dist`);\r\n }\r\n```"},"comment":{"url":"https://api.github.com/repos/flyjs/fly/issues/comments/250946537","html_url":"https://github.com/flyjs/fly/issues/216#issuecomment-250946537","issue_url":"https://api.github.com/repos/flyjs/fly/issues/216","id":250946537,"user":{"login":"lukeed","id":5855893,"avatar_url":"https://avatars.githubusercontent.com/u/5855893?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeed","html_url":"https://github.com/lukeed","followers_url":"https://api.github.com/users/lukeed/followers","following_url":"https://api.github.com/users/lukeed/following{/other_user}","gists_url":"https://api.github.com/users/lukeed/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeed/subscriptions","organizations_url":"https://api.github.com/users/lukeed/orgs","repos_url":"https://api.github.com/users/lukeed/repos","events_url":"https://api.github.com/users/lukeed/events{/privacy}","received_events_url":"https://api.github.com/users/lukeed/received_events","type":"User","site_admin":false},"created_at":"2016-10-02T00:41:25Z","updated_at":"2016-10-02T00:41:25Z","body":"Releasing as `1.4.1`. Give it a spin && let me know! \r\n\r\nI tested on windows with 5-level nesting, worked like it's supposed to. Thanks for reporting :)"}}
{"actor":{"display_login":"lukeed"}}