{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/7237","repository_url":"https://api.github.com/repos/babel/babel","labels_url":"https://api.github.com/repos/babel/babel/issues/7237/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/7237/comments","events_url":"https://api.github.com/repos/babel/babel/issues/7237/events","html_url":"https://github.com/babel/babel/issues/7237","id":289741738,"number":7237,"title":"@babel/cli: default the src/out directory","user":{"login":"hzoo","id":588473,"avatar_url":"https://avatars1.githubusercontent.com/u/588473?v=4","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},"labels":[{"id":555615173,"url":"https://api.github.com/repos/babel/babel/labels/claimed","name":"claimed","color":"bfdadc","default":false},{"id":441984845,"url":"https://api.github.com/repos/babel/babel/labels/i:%20enhancement","name":"i: enhancement","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-01-18T19:06:45Z","updated_at":"2018-05-08T18:25:55Z","closed_at":null,"author_association":"OWNER","body":"https://babeljs.io/docs/usage/cli/#compile-directories\r\n\r\nI think we can default `babel` without any arguments to be `babel src --out-dir lib` (default to the src/ directory and output to lib or dist?), I guess we may need to check existence and all that?\r\n\r\nProbably a check around here? https://github.com/babel/babel/blob/47ce7e71c9f97d151be493d05755562cb299fcca/packages/babel-cli/src/babel/index.js#L181\r\n\r\nThis is just so if you want to do something in package.json like `\"build\": \"babel src -d lib\"`, you can do ``\"build\": \"babel\"`` instead.\r\n\r\nCan look to other tools that do this kind of thing as well.\r\n\r\n> aside: we should add some better error messages around this kind of thing, like if a config isn't found, etc.\r\n\r\nlike in https://github.com/developit/microbundle, @developit \r\n\r\nEDIT: Comment below if you are going to work on this"},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/387497121","html_url":"https://github.com/babel/babel/issues/7237#issuecomment-387497121","issue_url":"https://api.github.com/repos/babel/babel/issues/7237","id":387497121,"user":{"login":"iansu","id":433725,"avatar_url":"https://avatars2.githubusercontent.com/u/433725?v=4","gravatar_id":"","url":"https://api.github.com/users/iansu","html_url":"https://github.com/iansu","followers_url":"https://api.github.com/users/iansu/followers","following_url":"https://api.github.com/users/iansu/following{/other_user}","gists_url":"https://api.github.com/users/iansu/gists{/gist_id}","starred_url":"https://api.github.com/users/iansu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iansu/subscriptions","organizations_url":"https://api.github.com/users/iansu/orgs","repos_url":"https://api.github.com/users/iansu/repos","events_url":"https://api.github.com/users/iansu/events{/privacy}","received_events_url":"https://api.github.com/users/iansu/received_events","type":"User","site_admin":false},"created_at":"2018-05-08T18:25:55Z","updated_at":"2018-05-08T18:25:55Z","author_association":"NONE","body":"As I understand it the basic algorithm will be:\r\n\r\n1. Try to get the output dir from `main`\r\n2. If not found check for `lib` or `dist` (in which order?)\r\n3. If not found default to `lib` or `dist` (which one?)\r\n\r\nThe big question is, what's the default `lib` or `dist`?"}}
{"actor":{"display_login":"iansu"}}