{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/3331","repository_url":"https://api.github.com/repos/babel/babel","labels_url":"https://api.github.com/repos/babel/babel/issues/3331/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/3331/comments","events_url":"https://api.github.com/repos/babel/babel/issues/3331/events","html_url":"https://github.com/babel/babel/pull/3331","id":131922803,"number":3331,"title":"Support passing options to presets.","user":{"login":"loganfsmyth","id":132260,"avatar_url":"https://avatars.githubusercontent.com/u/132260?v=3","gravatar_id":"","url":"https://api.github.com/users/loganfsmyth","html_url":"https://github.com/loganfsmyth","followers_url":"https://api.github.com/users/loganfsmyth/followers","following_url":"https://api.github.com/users/loganfsmyth/following{/other_user}","gists_url":"https://api.github.com/users/loganfsmyth/gists{/gist_id}","starred_url":"https://api.github.com/users/loganfsmyth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loganfsmyth/subscriptions","organizations_url":"https://api.github.com/users/loganfsmyth/orgs","repos_url":"https://api.github.com/users/loganfsmyth/repos","events_url":"https://api.github.com/users/loganfsmyth/events{/privacy}","received_events_url":"https://api.github.com/users/loganfsmyth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/babel/babel/labels/tag:%20new%20feature","name":"tag: new feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/babel/babel/milestones/7","html_url":"https://github.com/babel/babel/milestones/6.6","labels_url":"https://api.github.com/repos/babel/babel/milestones/7/labels","id":1568706,"number":7,"title":"6.6","description":"","creator":{"login":"hzoo","id":588473,"avatar_url":"https://avatars.githubusercontent.com/u/588473?v=3","gravatar_id":"","url":"https://api.github.com/users/hzoo","html_url":"https://github.com/hzoo","followers_url":"https://api.github.com/users/hzoo/followers","following_url":"https://api.github.com/users/hzoo/following{/other_user}","gists_url":"https://api.github.com/users/hzoo/gists{/gist_id}","starred_url":"https://api.github.com/users/hzoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzoo/subscriptions","organizations_url":"https://api.github.com/users/hzoo/orgs","repos_url":"https://api.github.com/users/hzoo/repos","events_url":"https://api.github.com/users/hzoo/events{/privacy}","received_events_url":"https://api.github.com/users/hzoo/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-02-07T14:51:31Z","updated_at":"2016-02-07T14:51:41Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-02-07T01:56:43Z","updated_at":"2016-02-10T21:40:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/babel/babel/pulls/3331","html_url":"https://github.com/babel/babel/pull/3331","diff_url":"https://github.com/babel/babel/pull/3331.diff","patch_url":"https://github.com/babel/babel/pull/3331.patch"},"body":"To get the conversation started :)\r\n\r\nLooking at the ecosystem of presets of that has grown for Babel 6 so far, this seems like it would be a welcome feature. \r\n\r\n* We've got a bunch of presets for different Node versions, and that'll only grow. Why not a single one with a version options?\r\n* We've got a copy of `es2015` with `loose`\r\n* We've got several copies of `es2015` without CommonJS\r\n\r\nand plenty more. "},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/182593459","html_url":"https://github.com/babel/babel/pull/3331#issuecomment-182593459","issue_url":"https://api.github.com/repos/babel/babel/issues/3331","id":182593459,"user":{"login":"d4rkr00t","id":200119,"avatar_url":"https://avatars.githubusercontent.com/u/200119?v=3","gravatar_id":"","url":"https://api.github.com/users/d4rkr00t","html_url":"https://github.com/d4rkr00t","followers_url":"https://api.github.com/users/d4rkr00t/followers","following_url":"https://api.github.com/users/d4rkr00t/following{/other_user}","gists_url":"https://api.github.com/users/d4rkr00t/gists{/gist_id}","starred_url":"https://api.github.com/users/d4rkr00t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d4rkr00t/subscriptions","organizations_url":"https://api.github.com/users/d4rkr00t/orgs","repos_url":"https://api.github.com/users/d4rkr00t/repos","events_url":"https://api.github.com/users/d4rkr00t/events{/privacy}","received_events_url":"https://api.github.com/users/d4rkr00t/received_events","type":"User","site_admin":false},"created_at":"2016-02-10T21:40:38Z","updated_at":"2016-02-10T21:40:38Z","body":"I've tried, but I did not issued it as pull request because I'm not quite sure it's ok solution. But, anyway, you may look at it here https://github.com/d4rkr00t/babel/commit/ac4fb0f48a5a906ea897dd43effafe0cfe27b457.\r\n\r\nI ran into some troubles in tests because of require is relative to current directory and closest node_modules dirs. \r\n\r\nIn the helper function https://github.com/d4rkr00t/babel/commit/ac4fb0f48a5a906ea897dd43effafe0cfe27b457#diff-35232e36a88e5301dcb036713aec30f8R309 I enclose require in a clojure and it become relative to babel-core dir. And starts act like when you declare plugin as a string in a preset.\r\n```js\r\n{ plugins: [\"plugin-name\"] }\r\n```\r\n\r\nThere is a hacky workaround but I'm not happy with it https://github.com/d4rkr00t/babel/commit/ac4fb0f48a5a906ea897dd43effafe0cfe27b457#diff-e96b569fc21d92fde9d6d61d295c4195R2.\r\n\r\nIf it's ok, I'll update other presets and send pull request. If it's not, I'll try to come up with better solution. :)\r\n\r\n\r\n\r\n"}}