devstream icon indicating copy to clipboard operation
devstream copied to clipboard

:four_leaf_clover: `Proposal`: Spec for templates, naming system

Open iyear opened this issue 2 years ago • 2 comments

What Would You Like to Add? Why Is This Needed?

Currently we do not have strict rules for templates and naming, which leads to confusion in using them. After members' discussion, we make the following specification for future templates, naming.

During the development of the specification, we minimized the number of code changes.

Design

Global:

  1. Vars passing: [[ VAR_NAME ]] without template syntax.
  2. Other templates(YAML template/Inside the plugin/...): [[ ]] with full template syntax.
  3. Plugin outputs passing: ${{PLUGIN.INTANCE_ID.outputs.OUTPUT_NAME}}
  4. Plugin config yaml: lowerCamelCase

Spec for plugin repo-scaffolding:

  1. Template library directory variables for repo-scaffolding plugins: [[ VAR_NAME ]] without template syntax.
  2. Template library template file suffix: .tpl.suffix

Anything else

  1. Standardize existing code
  2. Documenting the spec

iyear avatar Jul 30 '22 02:07 iyear

what if filename template, for example golang reposcaffolding use app_name for filename placeholder

steinliber avatar Aug 03 '22 02:08 steinliber

what if filename template, for example golang reposcaffolding use app_name for filename placeholder

Perhaps it could be aligned with the directory variables?

iyear avatar Aug 03 '22 03:08 iyear