From cabe0b04a0cf3a07f0daad51002156570654f16e Mon Sep 17 00:00:00 2001 From: Tom Peltonen Date: Sun, 3 Mar 2024 18:08:39 +1100 Subject: [PATCH] Updating template defs added temlates --- generator/default/build/build.tmpl | 2 -- .../build/definitions/golang/build_linux.tmpl | 8 ++++++ .../build/definitions/golang/build_win.tmpl | 8 ++++++ generator/default/build/golang.json | 25 ++++++++++--------- .../sequence/definitions/sd01}/sd01.md.tmpl | 0 .../definitions/sd01}/sd01.mermaid.tmpl | 0 .../definitions/sd02}/sd02.mermaid.tmpl | 0 other/default/sequence/md_sequence.json | 19 ++++++++++++++ other/default/sequence/mermaid_sequence.json | 19 ++++++++++++++ 9 files changed, 67 insertions(+), 14 deletions(-) delete mode 100644 generator/default/build/build.tmpl create mode 100644 generator/default/build/definitions/golang/build_linux.tmpl create mode 100644 generator/default/build/definitions/golang/build_win.tmpl rename {generator/default/sequence => other/default/sequence/definitions/sd01}/sd01.md.tmpl (100%) rename {generator/default/sequence => other/default/sequence/definitions/sd01}/sd01.mermaid.tmpl (100%) rename {generator/default/sequence => other/default/sequence/definitions/sd02}/sd02.mermaid.tmpl (100%) create mode 100644 other/default/sequence/md_sequence.json create mode 100644 other/default/sequence/mermaid_sequence.json diff --git a/generator/default/build/build.tmpl b/generator/default/build/build.tmpl deleted file mode 100644 index ff10b4f..0000000 --- a/generator/default/build/build.tmpl +++ /dev/null @@ -1,2 +0,0 @@ - -# Nothing to see here diff --git a/generator/default/build/definitions/golang/build_linux.tmpl b/generator/default/build/definitions/golang/build_linux.tmpl new file mode 100644 index 0000000..88315fb --- /dev/null +++ b/generator/default/build/definitions/golang/build_linux.tmpl @@ -0,0 +1,8 @@ + +# Nothing to see here + +Write-Host "Linux GOLANG build" +Write-Host "Some text to print {{.Name}}" + +go build ../src/main.go + diff --git a/generator/default/build/definitions/golang/build_win.tmpl b/generator/default/build/definitions/golang/build_win.tmpl new file mode 100644 index 0000000..ff201c7 --- /dev/null +++ b/generator/default/build/definitions/golang/build_win.tmpl @@ -0,0 +1,8 @@ + +# Nothing to see here + +Write-Host "Windows GOLANG build" +Write-Host "Some text to print {{.Name}}" + +go build ../src/main.go + diff --git a/generator/default/build/golang.json b/generator/default/build/golang.json index 538950b..65b6ba7 100644 --- a/generator/default/build/golang.json +++ b/generator/default/build/golang.json @@ -3,17 +3,18 @@ "description": "golang build templates", "templates": [ { - "engine": "", - "folder": "", - "file_name": "golang.tmpl", + "engine": "golang", + "folder": "{{.SelfFolder}}/definitions/{{.TemplateName}}", + "file_name": "build_win.tmpl", "output_folder": "^/build", - "output_name": "golang.ps1", - "section": "", - "model": { - "activity": { - "category": "BUILD" - } - } - } - ] + "output_name": "golang_windows.ps1" + }, + { + "engine": "golang", + "folder": "{{.SelfFolder}}/definitions/{{.TemplateName}}", + "file_name": "build_linux.tmpl", + "output_folder": "^/build", + "output_name": "golang_linux.ps1" + } +] } \ No newline at end of file diff --git a/generator/default/sequence/sd01.md.tmpl b/other/default/sequence/definitions/sd01/sd01.md.tmpl similarity index 100% rename from generator/default/sequence/sd01.md.tmpl rename to other/default/sequence/definitions/sd01/sd01.md.tmpl diff --git a/generator/default/sequence/sd01.mermaid.tmpl b/other/default/sequence/definitions/sd01/sd01.mermaid.tmpl similarity index 100% rename from generator/default/sequence/sd01.mermaid.tmpl rename to other/default/sequence/definitions/sd01/sd01.mermaid.tmpl diff --git a/generator/default/sequence/sd02.mermaid.tmpl b/other/default/sequence/definitions/sd02/sd02.mermaid.tmpl similarity index 100% rename from generator/default/sequence/sd02.mermaid.tmpl rename to other/default/sequence/definitions/sd02/sd02.mermaid.tmpl diff --git a/other/default/sequence/md_sequence.json b/other/default/sequence/md_sequence.json new file mode 100644 index 0000000..f5908b1 --- /dev/null +++ b/other/default/sequence/md_sequence.json @@ -0,0 +1,19 @@ +{ + "name": "sd01", + "description": "Markdown sequence template", + "templates": [ + { + "engine": "", + "folder": "{{.SelfFolder}}/definitions/{{.TemplateName}}", + "file_name": "sd01.md.tmpl", + "output_folder": "^/docs", + "output_name": "seqdgm01.md", + "section": "", + "model": { + "activity": { + "category": "OTHER" + } + } + } + ] +} \ No newline at end of file diff --git a/other/default/sequence/mermaid_sequence.json b/other/default/sequence/mermaid_sequence.json new file mode 100644 index 0000000..3e5d650 --- /dev/null +++ b/other/default/sequence/mermaid_sequence.json @@ -0,0 +1,19 @@ +{ + "name": "sd02", + "description": "Mermaid sequence template", + "templates": [ + { + "engine": "", + "folder": "{{.SelfFolder}}/definitions/{{.TemplateName}}", + "file_name": "sd02.mermaid.tmpl", + "output_folder": "^/docs", + "output_name": "seqdgm02.mermaid", + "section": "", + "model": { + "activity": { + "category": "OTHER" + } + } + } + ] +} \ No newline at end of file