| Q | A <!--(Can use an emoji 👍) -->
| ------------------------ | ---
| Fixed Issues? |
| Patch: Bug Fix? | Y
| Major: Breaking Change? | N
| Minor: New Feature? |
| Tests Added + Pass? | Yes
| Documentation PR | <!-- If so, add `[skip ci]` to your commit message to skip CI -->
| Any Dependency Changes? |
| License | MIT
Currently the `opts.filename` value exposed to plugins is just whatever the user passed. While it _could_ be relative to the working directory, if Babel was passed an absolute URL, it'll be absolute.
This PR explicitly ensures the filename is a relative path based on the working directory. This also exposes an officially endorsed API for reading the working directory path.
@babel/cli
Babel command line.
In addition, various entry point scripts live in the top-level package at @babel/cli/bin.
There is a shell-executable utility script, babel-external-helpers.js, and the main Babel cli script, babel.js.
Install
npm install --save-dev @babel/core @babel/cli
Usage
babel script.js
For more in depth documentation see: http://babeljs.io/docs/usage/cli/