Babel Doctor
· 阅读需 1 分钟
Babel Doctor is
heavily inspiredripped from the awesome Yeoman Doctor by Sindre Sorhus.
babel-doctor has been removed as of v6.18.0 of
babel-cli
. If anyone needs it we will bring it back as a standalone npm module calledbabel-doctor
.
We launched Babel 6 last week. This was a pretty big change from the previous batteries included Babel and with it came a host of potential environment issues.
In order to combat this we now include a babel-doctor
command with the babel-cli
that
detects common problems with your Babel installation such as:
- Missing
.babelrc
. - Duplicate Babel core modules
- Outdated Babel core modules
Usage
First, make sure you have the Babel CLI installed.
Shell
$ npm install -g babel-cli@^6.1.0
Then simply cd
into your project directory and run:
Shell
$ babel-doctor
Babel Doctor
Running sanity checks on your system. This may take a few minutes...
✔ Found config at /Users/sebastian/.babelrc
✔ All babel packages appear to be up to date
✔ No duplicate babel packages found
Everything looks all right!
We hope this makes it easier to setup and use Babel in your project.
Happy hacking!