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

Adds 'Imports' functionality #486

Merged
merged 3 commits into from
Nov 25, 2016
Merged

Adds 'Imports' functionality #486

merged 3 commits into from
Nov 25, 2016

Conversation

ChrisBAshton
Copy link
Contributor

@ChrisBAshton ChrisBAshton commented Nov 25, 2016

Fixes #324.

You can now 'import' another config into your config, e.g.

a.yml:

imports: 'b.yml'

paths:
  home: /

b.yml:

browser: "phantomjs"

This is exactly the same as having one YML file with these contents:

paths:
  home: /

browser: "phantomjs"

@ChrisBAshton ChrisBAshton changed the base branch from master to v4 November 25, 2016 12:59
@ChrisBAshton ChrisBAshton mentioned this pull request Nov 25, 2016
3 tasks
@ChrisBAshton ChrisBAshton merged commit 6300cc4 into v4 Nov 25, 2016
@ChrisBAshton ChrisBAshton deleted the imports branch November 25, 2016 13:46
@ChrisBAshton
Copy link
Contributor Author

Imports introduced in Wraith v4.

@patricknelson
Copy link

Was there ever any intention to support multiple files and/or importing at depth?

I found this implementation to be helpful but very limiting beyond very basic configurations. That is: You can only import one file. Period. You can't just import one file per YAML file; just one file. So, you can't chain multiple files together to better abstract the config and you cannot list multiple files to import and merge together (would be preferred).

To me this suggests that:

  • When another YAML config is imported, you have to just override values (instead of having any sort of complicated nested merging strategy, which I understand).
  • Importing therefore cannot be recursive (also requiring more logic to prevent infinite recursion).

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