https://github.com/wpjunior/yml-expander
Create simple and easy yml templates without massive dependency instalation
https://github.com/wpjunior/yml-expander
template-metaprogramming yml
Last synced: about 2 months ago
JSON representation
Create simple and easy yml templates without massive dependency instalation
- Host: GitHub
- URL: https://github.com/wpjunior/yml-expander
- Owner: wpjunior
- License: mit
- Created: 2019-09-06T13:51:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-18T21:02:09.000Z (over 6 years ago)
- Last Synced: 2025-02-01T18:15:33.661Z (about 1 year ago)
- Topics: template-metaprogramming, yml
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yml-expander
Create simple and easy yml templates without massive dependency instalation
## Instalation
Install a release from: [github.com/wpjunior/yml-expander/releases](github.com/wpjunior/yml-expander/releases)
## Example of usage
Create a context file named `data.yml`
```
environments:
- dev
- staging
```
Create a template file named config.yml.tpl
```
environments:
{{ range $_, $environment := .environments }}
- name: example.{{ $environment }}
testing: true
{{ end }}
```
Generate `config.yml` running
```
yml-expander -data.path=data.yml -template.path=config.yml.tpl -output.path=config.yml
```
The output will be:
```
environments:
- name: example.dev
testing: true
- name: example.staging
testing: true
```