Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only set options in cli if different from default #4507

Merged
merged 2 commits into from Sep 13, 2016
Merged

Conversation

danez
Copy link
Member

@danez danez commented Sep 12, 2016

Q A
Bug fix? yes
Breaking change? no
New feature? no
Deprecations? no
Spec compliancy? no
Tests added/pass? yes
Fixed tickets #4385, #3899, babel/minify#67
License MIT
Doc PR

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

This is WIP, I still want to write tests and find all related issues.

@danez danez added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Sep 12, 2016
@danez danez changed the title CLI: Only set options if different from default WIP: Only set options if different from default Sep 12, 2016
@danez danez changed the title WIP: Only set options if different from default WIP: Only set options in cli if different from default Sep 12, 2016
@codecov-io
Copy link

codecov-io commented Sep 12, 2016

Current coverage is 88.32% (diff: 100%)

Merging #4507 into master will not change coverage

@@             master      #4507   diff @@
==========================================
  Files           194        194          
  Lines         13612      13612          
  Methods        1427       1427          
  Messages          0          0          
  Branches       3146       3146          
==========================================
  Hits          12023      12023          
  Misses         1589       1589          
  Partials          0          0          

Powered by Codecov. Last update 5e9e659...604fad1

@danez danez added the WIP label Sep 12, 2016
danez and others added 2 commits September 12, 2016 21:12
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.
Also ensure that the babelrc in the fixture folder is copied over to the
working directory during tests
@danez danez changed the title WIP: Only set options in cli if different from default Only set options in cli if different from default Sep 12, 2016
@danez danez removed the WIP label Sep 12, 2016
@hzoo
Copy link
Member

hzoo commented Sep 13, 2016

👍 Awesome! This should fix babel/minify#67 too?

@danez
Copy link
Member Author

danez commented Sep 13, 2016

Yes. Not sure though how we should do the "remove only none important comments", but that's an other issue anyway.

@hzoo
Copy link
Member

hzoo commented Sep 13, 2016

Yeah we should make another issue if not already @license, @preserve, etc ?

@hzoo hzoo merged commit ff78fb1 into master Sep 13, 2016
@hzoo hzoo deleted the danez-cli-options branch September 20, 2016 13:35
panagosg7 pushed a commit to panagosg7/babel that referenced this pull request Jan 17, 2017
* 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
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants