Skip to content

[Feature] Configuration file to render multiple templates #2

@alephao

Description

@alephao

If I have multiple files that I want to render, I would need to type the command multiple times or I could write a script that runs those commands, for example:

stencly render -d datasource.yaml -t template.stencil -o File.swift
stencly render -d datasource.yaml -t template2.stencil -o File2.swift
stencly render -d datasource2.yaml -t template3.stencil -o File3.swift

It would be great if Stencly could render multiple files based on a configuration specified by the user. For example, the configuration below would be equivalent to running the script above.

render:
  - datasource: datasource.yaml
    template: template.stencil
    output: File1.swift
  - datasource: datasource.yaml
    template: template2.stencil
    output: File3.swift
  - datasource: datasource.yaml
    template: template3.stencil
    output: File3.swift

Then the command stencly render could try to find a stencly.yaml file or the user could specify a config file by using an option like stencly render -c my_stencly_config.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions