Skip to content

Add new options.md and config-files.md files to replace current config-file and core options docs#1787

Merged
loganfsmyth merged 1 commit intobabel:masterfrom
loganfsmyth:options-and-file-overhaul
Aug 28, 2018
Merged

Add new options.md and config-files.md files to replace current config-file and core options docs#1787
loganfsmyth merged 1 commit intobabel:masterfrom
loganfsmyth:options-and-file-overhaul

Conversation

@loganfsmyth
Copy link
Copy Markdown
Member

I think this is a pretty good way to split things up. Let me know what you think!

@loganfsmyth loganfsmyth changed the title Add new options.md and config-files.md files to replace current config-file and core docs Add new options.md and config-files.md files to replace current config-file and core options docs Aug 28, 2018
@babel-bot
Copy link
Copy Markdown
Contributor

babel-bot commented Aug 28, 2018

Deploy preview for babel ready!

Built with commit 9fb7f99

https://deploy-preview-1787--babel.netlify.com

```
the config will now be entirely ignored, because it is across a package boundary.

One alternative would be to reate a `.babelrc` in each sub-package that uses ["extends"](options.md#extends) as
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: I suppose this should have been "create" instead of "reate"

directory for Babel is the individual packages), the `babel.config.js` file will not be automatically
loaded, and users will be required to set the path to it manually.

Project-wide configs can also be disable by setting ["configFile"](options.md#configFile) to `false`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/disable/disabled/

Babel loads `.babelrc` (and `.babelrc.js` / `package.json#babel`) files by searching up the
directory structure starting from the ["filename"](options.md#filename) being compiled. This can
be powerful because it allows you to create independent configurations for subsections of
a repository. File-relative configurations are also [merge](options.md#merging) over top of
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/[merge]/[merged]/

Babel can be configured! Many other tools have similar configs: ESLint (`.eslintrc`), Prettier (`.prettierrc`).

All Babel API [options](core.md#options) are allowed. However if the option requires JavaScript, you may need to use a `.babelrc.js` file.
All Babel API [options](options.md) are allowed. However if the option requires JavaScript, you may want to use a Javascript [configuration file](config-files.md).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC there should be a comma after "However"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants