Mustache
推薦可使用 CLI 工具動態產生檔案。
模板生成範例:
假設有多個不同的環境配置都用同一個模板來生成 yaml,可用如下
custom.json
the.template.yaml (共用模板)
輸入以下即可
之後會生成 the.yaml 檔案內容如下
Last updated
Was this helpful?
推薦可使用 CLI 工具動態產生檔案。
假設有多個不同的環境配置都用同一個模板來生成 yaml,可用如下
custom.json
the.template.yaml (共用模板)
輸入以下即可
之後會生成 the.yaml 檔案內容如下
Last updated
Was this helpful?
Was this helpful?
{
"network": "mainnet",
"factoryAddress": "0x0000",
}specVersion: 0.0.2
dataSources:
address: {{factoryAddress}}
network: {{network}}npx mustache ./config/custom.json the.template.yaml > the.yamlspecVersion: 0.0.2
dataSources:
address: mainnet
network: 0x0000