-
Notifications
You must be signed in to change notification settings - Fork 30
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
Use Jinja/Curly brackets inside YAML configs #74
Comments
@kingo55 |
Could we parse the contents of the curly brackets into a JS function? e.g. And the macro reads/parses/minifies the CSS? |
@kingo55
Then Jinja outputs: Then we can call injectCss function in modular builder to read and minify the CSS files. |
That's good to know @allmywant - could users run any arbitrary code in here? |
@kingo55 |
@allmywant - it could be a feature because there's other easier places to run arbitrary code... This might just enable some unique features we're not aware of just yet. E.g. Fetching a dynamic |
@kingo55 |
The modular builder could be more expressive if we used curly brackets to inject JS/CSS etc than if we hard-coded this logic into specific fields:
https://jinja.palletsprojects.com/en/2.11.x/templates/
It works quite well in Jinja, dbt, Home Assistant and other projects, so it might work well here too. Rather than:
We could have something like:
This would allow us to support new variable types (e.g. JSON) or fields as they come available e.g. custom functions passed into the
option
keys, likedecisionAdapter
,storageAdapter
and whatnot.This would change how we write all experiments' YAML files though, so perhaps we need to think this through properly and map out migration.
The text was updated successfully, but these errors were encountered: