New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@babel/cli: default the src/out directory #7237
Comments
|
+1 for |
|
You can do whatever you want with the flags, this is just so This + #6027 for cli should mean you just have to do |
FWIW, Webpack appears to be defaulting to |
Hmm I thought the convention is |
Might be worth inspecting what the user has in their |
Ok so could look to the |
I’m interested in doing this if it’s still up for grabs. |
Yeah go for it @iansu 👍 |
As I understand it the basic algorithm will be:
The big question is, what's the default |
Yeah, I was thinking |
That logic makes sense to me. I'll use |
We can check |
@nicolo-ribaudo that might add some "magic" difficult to reason about by the final user, don't you think? |
I have an initial implementation of this here: #7966 It works but there are still some things to do like updating tests and documentation. Feedback welcome. |
https://babeljs.io/docs/usage/cli/#compile-directories
I think we can default
babel
without any arguments to bebabel 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?Probably a check around here?
babel/packages/babel-cli/src/babel/index.js
Line 181 in 47ce7e7
This is just so if you want to do something in package.json like
"build": "babel src -d lib"
, you can do"build": "babel"
instead.Can look to other tools that do this kind of thing as well.
like in https://github.com/developit/microbundle, @developit
EDIT: Comment below if you are going to work on this
The text was updated successfully, but these errors were encountered: