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

feat: add support for configuration inheritance with extends #330

Closed
wants to merge 2 commits into from
Closed

feat: add support for configuration inheritance with extends #330

wants to merge 2 commits into from

Conversation

alan-agius4
Copy link
Member

Closes: #329

I'm submitting a...

[ ] Bug Fix
[x] Feature
[ ] Other (Refactoring, Added tests, Documentation, ...)

Checklist

  • Commit Messages follow the Conventional Commits pattern
    • A feature commit message is prefixed "feat:"
    • A bugfix commit message is prefixed "fix:"
  • Tests for the changes have been added

Description

Add support for configuration inheritance with extends

Closes: #329

Does this PR introduce a breaking change?

[ ] Yes
[x] No

@dherges
Copy link
Contributor

dherges commented Nov 28, 2017

Hi @alan-agius4,

if you ask my personal opinion: No. These kind of features led us in the past to the point where ng-packagr started: frustration in the face of thousands of lines of json configuration, possibly merging and overwriting values from one file with another.

Altogether, from the discussions in #190 and #278 I am happy with a ng-package.js file. People can implement configuration merging by providing a "dynamic js config".

@alan-agius4
Copy link
Member Author

alan-agius4 commented Nov 28, 2017

@dherges,

This below approach from #278 is also good; (didn’t see it before)

ng-package.js exporting the config (thru module.exports or exports default)

That said, the extends seems to be quite popular now a-days especially since it's also using by TypeScript in tsconfig.json, Ts Lint in tslint.json and many others. And the values will be overridden based on the hierarchy. Ie the first value found will override any other value for that property set in child files.

But at the end it's your call really :)

@dherges dherges closed this Nov 28, 2017
@alan-agius4 alan-agius4 deleted the feature/json-extends branch January 18, 2018 06:13
@github-actions
Copy link

This PR has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

This action has been performed automatically by a bot.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Configuration inheritance with extends
2 participants