146 Commits

Author SHA1 Message Date
Antoine Prieëls
26e4911eb2 Use the async version of transform in babel-cli (#6826)
* use the async version of transform in babel-cli

* Modify compile to use async version of transformFile

* Babel-CLI: transform files sequentially

* Remove useless res in callback
2018-01-09 19:17:07 -08:00
Logan Smyth
aa2d415507 Expose the envName as a programmatic and CLI option. 2017-11-15 11:24:39 -08:00
Logan Smyth
0a2a0bb254 Remove the relative babel-core option. 2017-10-25 15:55:57 -07:00
Mateusz Burzyński
859ea4b175 Scoped: updated numerous docs with scoped packages change [skip ci] 2017-10-16 22:49:57 -04:00
Henry Zhu
cde0054227 Scoped: change src imports to @babel/ [skip ci] 2017-10-16 22:49:56 -04:00
Logan Smyth
c1df126b83 Remove wrap function and calculate code frames earlier. 2017-10-02 13:48:02 -07:00
Brian Ng
9cd4716cb4 Add --include-dotfiles option to babel-cli (#6232) 2017-10-02 08:55:53 -05:00
Pranav Prakash
2374062bbd Remove babel-node from babel-cli (#6251)
* 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
2017-09-23 11:25:27 -07:00
Laurin Quast
8742012b5e Add --keep-file-extension option to babel-cli (#6221)
* Add --keep-module-extension option to babel-cli

* Rename keep-module-extension option to keep-file-extension; Change option to preserve all file extensions
2017-09-11 18:06:44 -04:00
Lukas Geiger
b6467a68ca Add option to define output directory relative to the input (#5421)
* 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
2017-09-09 20:38:06 -04:00
Zev Isert
2dd03e3ee9 Allow NodeJS v8.4 experimental HTTP2 (#6175)
* Allow NodeJS v8.4 experimental HTTP2

Native NodeJS HTTP/2 support experimental though, so might not be worth merging this

* Linter picked up on a line with only spaces

Removed the spaces
2017-09-02 00:42:45 +02:00
Justin Ridgewell
f7109658f9 Added --delete-dir-on-start option for babel (#6187)
* added --delete-dir-on-start option 

added --delete-dir-on-start-option to delete dir on start of compilation to remove deleted files from the orignial files from the --out-dir

* added option --delete-dir-on-start

added --delete-dir-on-start that option will delete the --out-dir before the compilation of code to remove the deleted files from the source from the out directory

* added --delete-dir-on-start option

added --delete-dir-on-start-option to delete dir on start of compilation to remove deleted files from the orignial files from the --out-dir

* bug removed deleting the correct dir

in the previous code, the source dir was deleted each time rather than deleting the out dir

* Remove shorthand

* Prevent babel-cli option from reaching babel-core

* Lint
2017-09-01 17:45:13 -04:00
Bryan Wain
63baaa7148 add --config-file option to CLI to pass in .babelrc location (#6133) 2017-08-22 13:58:24 -04:00
Brian Ng
e4b35f680d
Run prettier 2017-06-27 12:15:00 -05:00
bill-improbableio
851d2cb6e0 Pass SIGINT signals to the spawned child process (#5861)
* Pass SIGINT signals down to the spawned child

* Kill process with correct signal

* Fix lint issues

* Fix exit for outer process
2017-06-24 19:04:53 -04:00
Henry Zhu
4595729cbb fix issue as a result of refactor (#5867) 2017-06-17 16:01:33 -04:00
noinkling
517ecdae65 Allow --inspect-brk option to be used with babel-node 2017-05-28 18:08:04 +12:00
Bradley Farias
7ca81700f7 add .mjs to list of well known extensions
this is to conform to the plan of the Node.js EP
2017-05-01 09:43:49 -07:00
Logan Smyth
39c862c195 Make only/ignore relative to cwd/config file and move only/ignore checking all to core. (#5487)
* Make only/ignore relative to cwd/config file and move only/ignore checking all to core.
2017-03-16 23:22:43 -07:00
Logan Smyth
4f72232ca9 Move option parsing to babel-cli. 2017-03-13 11:06:46 -07:00
Logan Smyth
2c564a6973 Move babel config descriptions to babel-cli. 2017-03-13 00:06:01 -07:00
Logan Smyth
0c0f090a98 Get rid of circular dependencies in babel cli script. 2017-03-13 00:00:56 -07:00
Brian Ng
8a82cc060a Run new lint rules (#5413) 2017-03-04 10:46:01 -05:00
Logan Smyth
4ee385e96c Avoid usage of exports/module.exports/require(). 2017-02-21 16:52:42 -08:00
Henry Zhu
9083bd6283 Merge branch 'master' into 7.0 2017-02-09 18:36:02 -05:00
Logan Smyth
b845f2b69d Re-enable the max-len ESLint rule. (#5265) 2017-02-04 11:07:15 -05:00
Henry Zhu
661102c7ea Merge branch 'master' into 7.0
# Conflicts:
#	.travis.yml
#	CHANGELOG.md
#	lerna.json
#	packages/babel-cli/package.json
2017-01-21 08:52:14 -05:00
Andres Suarez
e9d87ed55c Remove path-is-absolute in favor of builtin path.isAbsolute (#5179) 2017-01-21 08:33:34 -05:00
Logan Smyth
6528fe105e Break out of argument processing properly. 2017-01-19 21:47:11 -08:00
Logan Smyth
e863790e7e Fix linting error from merged PR. 2017-01-15 15:29:26 -08:00
Logan Smyth
40746f3dcb Merge pull request #3698 from hayeah/master
Watch mode should wait for file write. (T7411)
2017-01-15 14:44:45 -08:00
Logan Smyth
a98c9ae9dc Merge pull request #4790 from peterm0x/master
fixes invalid line offsets in merged sourcemaps
2017-01-15 14:36:33 -08:00
Andres Suarez
658f13e030 Replace uses of "lodash/each" with native equivalents 2017-01-15 13:54:54 -08:00
Andres Suarez
85b3aec747 Use native or lodash util module where full "lodash" is required 2017-01-15 13:35:00 -08:00
Henry Zhu
672adba9a1 enable prefer const (#5113) 2017-01-14 09:48:52 -05:00
Peter Mikula
fad6483aac fixes invalid line offsets in merged sourcemaps 2016-10-28 21:36:40 +03:00
Simen Bekkhus
9c2794dc85 Replace path-exists with fs.existsSync (#4731)
It's not deprecated anymore, see nodejs/node#8364
2016-10-17 14:31:49 -04:00
Kai Cataldo
50baac3251 Remove babel-doctor from babel-cli (#4725)
* Remove babel-doctor from babel-cli

fixes #4678

* Throw when babel-doctor is used
2016-10-14 14:49:16 -04:00
Henry Zhu
71790aace0 update eslint-config, fixes, add commands (#4721)
* update eslint-config, fixes, add commands

* switch plugin
2016-10-13 21:37:07 +02:00
Gyandeep Singh
6cfd3d91b2 Update: Eslint to 3.0 and update CI builds (fixes #4638) (#4680) 2016-10-05 17:44:25 -04:00
Henry Zhu
fc2b3cb465 Fixes T2299: Prevent REPL from printing implicit 'use strict' (#4562)
* Fixes T2299: Prevent REPL from printing implicit 'use strict'

* Test for T2299

* make fixes
2016-09-25 23:29:37 -04:00
Henry Zhu
a793107bf3 fix lint 2016-09-20 14:04:15 -04:00
Logan Smyth
46eb99b18b Use the real sourcemap API and handle input sourcemaps - fixes T7259 (#3456) 2016-09-20 13:39:01 -04:00
Daniel Tschinder
ff78fb19f7 Only set options in cli if different from default (#4507)
* CLI: Only set options if different from default 

Currently default values (like comments: true) will be set always for the transform.
This behaviour dos not allow for setting this options from babelrc as the default would always have precedence.

* Add new tests for comments
Also ensure that the babelrc in the fixture folder is copied over to the
working directory during tests
2016-09-13 08:25:08 -04:00
Andy Kant
5e9e659a7f Support custom ports for V8 Inspector (#4508) 2016-09-12 21:00:02 +02:00
Howard Yeh
32232dd30e Watch mode should wait for file change. (T7411) 2016-09-03 16:33:22 +08:00
Thomas Aylott
2a4186faf3 Fixes #6726 ignore config option (#3644)
https://phabricator.babeljs.io/T6726
2016-08-23 14:55:37 -04:00
Daniel Tschinder
88eec4b852 Support all variations of v8Flags (#3578)
This adds support for specifying v8Flags with dashes. Previously only underscores
were allowed.
Also allows specifying values for v8Flags in the from --flag=value, which was not supported till now.
Also add --inspect support.
2016-07-18 10:36:03 -04:00
Aleksey Smolenchuk
2033c1da30 remove shorthand of --skip-initial-build
-s is already taken by --source-maps
2016-06-10 22:46:24 -07:00
Aleksey Smolenchuk
4bf6f8ab18 cli: --skip-initial-build option to compile only on watched changes 2016-05-20 09:47:41 -07:00