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
Split config extends
functionality to separate module?
#1374
Comments
well we're at it we should address this bug: #1372 😝 I'm a little torn, because I've tried to be pretty conservative about splitting yargs into packages:
If we think that extends' logic is valuable enough to extract, perhaps we can just continue vendoring it inside yargs, but extract it into its own module; then just add a note in the file that it shouldn't be edited in place. |
I was thinking to avoid pulling all of yargs into |
@coreyfarrell what I don't love about this is, you do end up pulling in the Let's split it into a module? and I'll just vendor it. |
Actually I'm planning to vendor it into See istanbuljs/load-nyc-config#4 Leaving this ticket open for now so we can decide if some of the enhancements I made should be contributed back to yargs. |
Ref istanbuljs/load-nyc-config#2
The module in question is to be used by both nyc and babel-plugin-istanbul. The babel plugin does not use yargs (no CLI processing), but we want it to load the same configuration as nyc. Currently
extends
is not processed. I could probably useconst applyExtends = require('yargs/lib/apply-extends')
but this is not documented as a public API and the babel plugin has no reason to install yargs as a whole. It would be nice iflib/apply-extends.js
were it's own stand-alone module so the babel plugin could get identical config loading functionality as nyc without pulling in all of yargs.The text was updated successfully, but these errors were encountered: