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
Document plugin options and how to set them #400
Comments
If you're using
The preset is able to toggle plugins as well as pass the options down to the plugins it uses and the corresponding plugin options are available in the respective plugin README which is also linked in the preset options. Refer to preset options given in the preset docs (https://github.com/babel/babili/tree/master/packages/babel-preset-babili). If you think the docs can be improved, we are accepting PullRequests and I'll be happy to merge it. |
but I don't want any other transformations. I want to set options on the plugins that are part of the babili preset. With the Point 4 was my bad, as I saw 'Via Node API' and stopped scrolling. The Options section does indeed document what needs to be defined. There is however a discrepancy: the babelrc section gives |
It is supposed to accept Array too. Thanks for reminding. I just pushed the change. The command line now doesn't support the options to be passed to the preset. We can add that in future. You can use babel cli with a babelrc and this preset to add options (in the babelrc file). |
I'm new to Babili, and am finding the docs frustratingly limited.
.babelrc
is 'recommended', but thebabili
command uses--no-babelrc
- which seems contradictory.babelrc
, is there a command option to set plugin options, and if so what's the syntax?babili
command, I should be able to use thebabel
command with.babelrc
, right? Individual plugins, such as https://github.com/babel/babili/tree/master/packages/babel-plugin-minify-mangle-names, give examples of setting options, but AIUI this would mean only those plugins would be used, which is not what I want. I want to use the preset but set options on one or more plugins..babelrc
, but these either ('unsafe') don't correspond to a particular plugin or (mangle/blacklist) are in a different syntax from those which do. I can just about work out how these correspond by looking in https://github.com/babel/babili/blob/master/packages/babel-preset-babili/src/index.js, but ISTM it would be much better if these options were clearly documented.The text was updated successfully, but these errors were encountered: