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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(babel-transpiler): accept .js babel config files #1422

Merged
merged 1 commit into from
Mar 29, 2019

Conversation

ollelauribostrom
Copy link
Contributor

Babel supports a few different config file options as described here. Stryker currently expects a .babelrc-type file (in other words a json file that can be read and parsed). This PR adds support for .babelrc.js and babel.config.js files as well so that there is no longer any need for duplicated configurations 馃檪

Summary of changes

  • Check if the provided optionsFile is a .babelrc.js-file. If so, require and return it.
  • Check if the provided optionsFile is a babel.config.js. If so, require it, call it with an optionsApi object provided by the user and return the result
  • Add integration tests for verify that this is working as expected

@ghost ghost added the 馃攷 Needs review label Feb 25, 2019
@nicojs
Copy link
Member

nicojs commented Mar 29, 2019

Thanks a lot! Does this fix close #1249?

@nicojs nicojs merged commit 9e321f0 into stryker-mutator:master Mar 29, 2019
@ghost ghost removed the 馃攷 Needs review label Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants