* Add sourcemap examples for identifiers in code generator.
* Generate sourcemaps with exact mappings for identifiers, even if leading/trailing tokens also use that location.
<!--
Before making a PR please make sure to read our contributing guidelines
https://github.com/babel/babel/blob/master/CONTRIBUTING.md
For any issue references: Add a comma-separated list of a [closing word](https://help.github.com/articles/closing-issues-via-commit-messages/) followed by the ticket number fixed by the PR
-->
| Q | A <!--(yes/no) -->
| ------------------------ | ---
| Patch: Bug Fix? |
| Major: Breaking Change? |
| Minor: New Feature? | y
| Deprecations? |
| Spec Compliancy? |
| Tests Added/Pass? | y/y
| Fixed Tickets | #5616
| License | MIT
| Doc PR | <!-- if yes, add `[skip ci]` to your commit message to skip CI builds -->
| Dependency Changes |
<!-- Describe your changes below in as much detail as possible -->
Once merged I will make the corresponding documentation changes on the website (in a 7 branch)
| 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.
* feat(babel-cli): add a brief summary to build output
* address feedback
* further adjustments
* Use quiet output as default, add --verbose
* fix tests
* remove verbose alias
* Remove babel-node from babel-cli
* Use new Array instead of Array for V8 optimization
* Remove extraneous use strict clauses
* Require babel-node in babel-cli
* Remove babel-node from babel-cli
* Require babel-node in babel-cli
* Remove babel-node executable from babel-cli
* Clean up babel-node from package.json
* Add --keep-module-extension option to babel-cli
* Rename keep-module-extension option to keep-file-extension; Change option to preserve all file extensions
* Fix output directory if filename is given
* Add test for relative output path
* Add option to define output dir relative to input
* Add tests for --copy-files
* Test error handling for wrong arguments
* Remove whitespace generation and rely on default printing
Changes to printing:
* Add newline after last empty SwitchCase
* Add newlines around block comments if they are non-flow comments or contain newlines
* Fix a few more fixtures
* Remove node 7 and introduce node 8 in travis config
Progress on #5804
* Run yarn install with node 8
Progress on #5804
* Remove expose_debug_as from tests; replace with expose_gc_as
Fixes#5804
* Remove dashed options since they aren't listed
* Revert "Remove dashed options since they aren't listed"
This reverts commit f826167e320ee85331e09ac63b5674401cac6236.
* Enable babel for tests
This enables babel for tests by using a mocha compiler
It uses the babel config from package.json
Transformed OptionsManager test to es2015 to see if it works
Removed the 5s timeout from cli tests, as the default timeout is already 10s, this should probably fix the timouts on travis that we had in babylon
Also run the cli tests on travis, they were disabled if istanbul active, but istanbul is always active on travis so we were never running this tests.
* ignore scripts directory
* only register for tests
* Set only flag correctly