You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Config: Add framework and template_engine options (#1658)
This pull request adds `framework` and `template_engine` configuration
options to the `.herb.yml`.
These top-level settings tell Herb what environment it's running in and
what template engine is being used for compilation. This enables
context-aware behavior across the toolchain.
Configuration in `.herb.yml`:
```yml
framework: actionview # ruby | actionview | hanami | sinatra (default: ruby)
template_engine: herb # erubi | erb | herb (default: erubi)
```
Valid values are defined once in `config/options.yml` and code-generated
into the relevant configuration files in all bindings.
This allows us in the future to have more specific features tailored for
each target framework and engine. This pull request is meant to lay the
groundwork for:
- Framework-aware linter rules, so that we can automatically
enable/disable rules based on the framework (see
#480)
- Framework-aware compile-time optimizations. Knowing the framework
context determines which helpers are available for optimization (like
#1613)
- Template engine compatibility, surfacing invalid syntax or other
target engine's conventions across the toolchain (for example no ERB
block support)
0 commit comments