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: allow dynamic visual configuration via JS files #534

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ace-n-msft
Copy link
Contributor

Problem

My team wants to be able to configure visual parameters (e.g. authorship data) dynamically, based on factors such as environment variables.

Furthermore, we don't want to have to manually overwrite JSON files in order to do this.

Proposed Solution

Many other JavaScript projects (e.g. Webpack) support configuration files written in both JSON and JavaScript.

Writing config files in raw JavaScript allows end-users of a package to specify parameters that can change at runtime.

This PR adds JavaScript config support to this repo.

Notes

JS preference

This PR is written to silently prefer JavaScript configuration files over JSON ones. If both types of configuration file exist, the JSON one will be ignored.

Please let me know if I should change this!

Testing

These changes were tested on top of #533, and have been confirmed to pass.

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.

1 participant