From 2993c8bbff3d742dd339904fd16e30a4a995e41b Mon Sep 17 00:00:00 2001 From: "Z. Saygin Dogu" Date: Tue, 27 Jan 2026 10:39:04 +0000 Subject: [PATCH 1/3] fix: cursor added the comments to every stencil block. --- .github/workflows/build-release.yml | 24 +++++++++--- .gitignore | 3 +- .mise.toml | 9 ++++- manifest.yaml | 7 +++- .../.github/workflows/build-release.yml.tpl | 39 +++++++++++++++---- templates/.gitignore.tpl | 2 + templates/.goreleaser.yaml.tpl | 12 ++++-- templates/.mise.toml.tpl | 7 ++++ templates/go.mod.tpl | 3 ++ templates/manifest.yaml.tpl | 6 +++ 10 files changed, 92 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index bc1a643..fd9ba27 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -27,7 +27,9 @@ jobs: actions: read steps: ## <> - + ## Add additional CI secret configuration steps here + ## Use this to configure authentication or secrets needed for the build/test process + ## Example: - name: Configure AWS, uses: aws-actions/configure-aws-credentials@v2 ## <> - name: Checkout uses: actions/checkout@v4 @@ -52,18 +54,23 @@ jobs: github-token: ${{ github.token }} version: "latest" ## <> + ## Add authentication configuration steps for build/test here + ## Use this to set up authentication needed before building or testing + ## Example: - name: Authenticate, uses: some-auth-action@v1 ## <> - name: Build Test repo run: mise run buildtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies ## <> - + ## Add environment variables for the Build Test repo step here + ## Example: env: GITHUB_TOKEN: ${{ secrets.CUSTOM_TOKEN }} ## <> - name: Run Tests run: mise run runtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies ## <> - + ## Add environment variables for the Run Tests step here + ## Example: env: GITHUB_TOKEN: ${{ secrets.CUSTOM_TOKEN }} ## <> - name: Install JS Deps run: pnpm install @@ -72,6 +79,9 @@ jobs: env: # Fill in GH_TOKEN env with a different token here if you need a custom token to read module dependencies ## <> + ## Override the GitHub token used for README updates here + ## Default: GH_TOKEN: ${{ github.token }} + ## Example: GH_TOKEN: ${{ secrets.CUSTOM_GH_TOKEN }} GH_TOKEN: ${{ github.token }} ## <> - name: Commit back any changes @@ -79,7 +89,9 @@ jobs: with: commit_message: Update README.md manifest options table ## <> - + ## Add additional build/test steps here + ## These steps will run after the standard build and test steps + ## Example: - name: Custom Step, run: echo "Custom action" ## <> build-release: @@ -117,5 +129,7 @@ jobs: run: npx semantic-release ## <> - + ## Add additional GitHub Actions jobs here + ## These jobs will run alongside the build-and-test and build-release jobs + ## Example: my-custom-job: name: Custom Job, runs-on: ubuntu-latest, steps: [...] ## <> diff --git a/.gitignore b/.gitignore index 2bc9f75..d3efe5b 100644 --- a/.gitignore +++ b/.gitignore @@ -55,5 +55,6 @@ tests/native/* tests/template/* !tests/template/stencil.yaml ## <> - +## Add additional gitignore patterns here (e.g., "*.log", "custom-dir/") +## These patterns will be added to the .gitignore file ## <> diff --git a/.mise.toml b/.mise.toml index 93c562c..6ef964f 100644 --- a/.mise.toml +++ b/.mise.toml @@ -2,7 +2,8 @@ nodejs = "lts" pnpm = "latest" ## <> - +## Add additional tool versions here (e.g., "rust = '1.75'", "python = '3.11'") +## These will be installed via mise alongside the default tools ## <> # Template module tasks @@ -30,6 +31,9 @@ done description = 'Run the tests' dir = "tests" ## <> +## Customize the test runner configuration here +## This block allows you to override the default test execution command +## You can add environment variables, change the test directory, or modify the test command run = """ #!/usr/bin/env bash cd native @@ -44,5 +48,6 @@ description = 'Generate the README.md table of arguments' run = "node scripts/yamltotable.js" ## <> - +## Add custom mise tasks here (e.g., [tasks.mytask] description = "...", run = "...") +## These tasks will be available via 'mise run ' ## <> diff --git a/manifest.yaml b/manifest.yaml index 56b7f83..09d4d6c 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -2,6 +2,8 @@ name: github.com/udemy/stencil-module-base type: templates arguments: ## <> + ## Add custom Stencil module arguments here + ## These arguments can be used in templates and are passed when generating projects from this module nativeModule: required: false description: Does this module include native module golang code? @@ -36,9 +38,12 @@ arguments: ## <> modules: ## <> - + ## Add additional Stencil modules to include here + ## These modules will be loaded and their templates will be available during project generation ## <> ## <> +## Add extra manifest configuration here (e.g., postRunCommand, hooks, etc.) +## This block allows you to extend the manifest with additional configuration options postRunCommand: - name: Install/Update pnpm deps to lockfile command: "pnpm install --no-frozen-lockfile" diff --git a/templates/.github/workflows/build-release.yml.tpl b/templates/.github/workflows/build-release.yml.tpl index bb3ca86..ad34cbd 100644 --- a/templates/.github/workflows/build-release.yml.tpl +++ b/templates/.github/workflows/build-release.yml.tpl @@ -37,7 +37,10 @@ jobs: actions: read steps: ## <> -{{ file.Block "getMoreCiSecrets" }} + ## Add additional CI secret configuration steps here + ## Use this to configure authentication or secrets needed for the build/test process + ## Example: - name: Configure AWS, uses: aws-actions/configure-aws-credentials@v2 + {{ file.Block "getMoreCiSecrets" }} ## <> - name: Checkout uses: actions/checkout@v4 @@ -80,7 +83,9 @@ jobs: - name: Run Go Tests run: go run gotest.tools/gotestsum@latest ## <> -{{ file.Block "gotestvars" }} + ## Add environment variables for Go tests here + ## Example: env: TEST_DB_URL: ${{ secrets.TEST_DB_URL }} + {{ file.Block "gotestvars" }} ## <> {{- end }} {{- if stencil.Arg "templateModule" }} @@ -90,19 +95,26 @@ jobs: github-token: {{ "${{ github.token }}" }} version: 'latest' ## <> -{{ file.Block "buildtestauth" }} + ## Add authentication configuration steps for build/test here + ## Use this to set up authentication needed before building or testing + ## Example: - name: Authenticate, uses: some-auth-action@v1 + {{ file.Block "buildtestauth" }} ## <> - name: Build Test repo run: mise run buildtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies ## <> -{{ file.Block "buildTestEnvVars" }} + ## Add environment variables for the Build Test repo step here + ## Example: env: GITHUB_TOKEN: ${{ secrets.CUSTOM_TOKEN }} + {{ file.Block "buildTestEnvVars" }} ## <> - name: Run Tests run: mise run runtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies ## <> -{{ file.Block "runTestEnvVars" }} + ## Add environment variables for the Run Tests step here + ## Example: env: GITHUB_TOKEN: ${{ secrets.CUSTOM_TOKEN }} + {{ file.Block "runTestEnvVars" }} ## <> - name: Install JS Deps run: pnpm install @@ -111,6 +123,9 @@ jobs: env: # Fill in GH_TOKEN env with a different token here if you need a custom token to read module dependencies ## <> + ## Override the GitHub token used for README updates here + ## Default: GH_TOKEN: ${{ github.token }} + ## Example: GH_TOKEN: ${{ secrets.CUSTOM_GH_TOKEN }} {{- if empty (file.Block "readmeUpdateGhToken") }} GH_TOKEN: {{ "${{ github.token }}" }} {{- else }} @@ -122,7 +137,10 @@ jobs: with: commit_message: Update README.md manifest options table ## <> -{{ file.Block "buildteststeps" }} + ## Add additional build/test steps here + ## These steps will run after the standard build and test steps + ## Example: - name: Custom Step, run: echo "Custom action" + {{ file.Block "buildteststeps" }} ## <> {{- end }} @@ -193,7 +211,9 @@ jobs: env: GITHUB_TOKEN: {{ "${{ secrets.GITHUB_TOKEN }}" }} ## <> -{{ file.Block "goreleaserEnvVars" }} + ## Add environment variables for goreleaser here + ## Example: CUSTOM_VAR: ${{ secrets.CUSTOM_VAR }} + {{ file.Block "goreleaserEnvVars" }} ## <> {{- else }} - name: Install JS Deps @@ -205,5 +225,8 @@ jobs: {{- end }} ## <> -{{ file.Block "extraActions" }} + ## Add additional GitHub Actions jobs here + ## These jobs will run alongside the build-and-test and build-release jobs + ## Example: my-custom-job: name: Custom Job, runs-on: ubuntu-latest, steps: [...] + {{ file.Block "extraActions" }} ## <> diff --git a/templates/.gitignore.tpl b/templates/.gitignore.tpl index a875bc7..5ef775e 100644 --- a/templates/.gitignore.tpl +++ b/templates/.gitignore.tpl @@ -55,5 +55,7 @@ tests/{{ $entry.Name }}/* {{ end -}} {{ end -}} ## <> +## Add additional gitignore patterns here (e.g., "*.log", "custom-dir/") +## These patterns will be added to the .gitignore file {{ file.Block "ignores" }} ## <> diff --git a/templates/.goreleaser.yaml.tpl b/templates/.goreleaser.yaml.tpl index a9a9c41..712a806 100644 --- a/templates/.goreleaser.yaml.tpl +++ b/templates/.goreleaser.yaml.tpl @@ -15,7 +15,9 @@ builds: - -s - -w ## <> -{{ file.Block "pluginLdflags" }} + ## Add additional linker flags for the plugin build here + ## Example: -X main.version={{ .Version }} + {{ file.Block "pluginLdflags" }} ## <> env: - CGO_ENABLED=0 @@ -23,14 +25,18 @@ builds: - amd64 - arm64 ## <> -{{ file.Block "pluginExtraArch" }} + ## Add additional architectures to build for here (e.g., "386", "arm") + ## Default architectures are amd64 and arm64 + {{ file.Block "pluginExtraArch" }} ## <> goos: - linux - darwin - windows ## <> -{{ file.Block "pluginExtraOS" }} + ## Add additional operating systems to build for here (e.g., "freebsd", "openbsd") + ## Default operating systems are linux, darwin, and windows + {{ file.Block "pluginExtraOS" }} ## <> ignore: - goos: windows diff --git a/templates/.mise.toml.tpl b/templates/.mise.toml.tpl index 30d101c..54f4cd7 100644 --- a/templates/.mise.toml.tpl +++ b/templates/.mise.toml.tpl @@ -11,6 +11,8 @@ goreleaser = "latest" "go:github.com/thenativeweb/get-next-version" = "latest" {{- end }} ## <> +## Add additional tool versions here (e.g., "rust = '1.75'", "python = '3.11'") +## These will be installed via mise alongside the default tools {{ file.Block "additionalTools" }} ## <> @@ -76,6 +78,9 @@ done description = 'Run the tests' dir = "tests" ## <> +## Customize the test runner configuration here +## This block allows you to override the default test execution command +## You can add environment variables, change the test directory, or modify the test command {{- if (empty (file.Block "runTests")) }} env = {ENV_VAR_NAME = 'hooray'} # env vars for the script run = """ @@ -93,5 +98,7 @@ description = 'Generate the README.md table of arguments' run = "node scripts/yamltotable.js" ## <> +## Add custom mise tasks here (e.g., [tasks.mytask] description = "...", run = "...") +## These tasks will be available via 'mise run ' {{ file.Block "tasks" }} ## <> diff --git a/templates/go.mod.tpl b/templates/go.mod.tpl index 9037005..e84a6b9 100644 --- a/templates/go.mod.tpl +++ b/templates/go.mod.tpl @@ -6,6 +6,9 @@ module github.com/{{ stencil.Arg "githubOrg" }}/{{ .Config.Name }} go 1.25 // <> +// Add additional Go module dependencies here +// If this block is empty, default dependencies will be used +// If you provide content, it will replace the default require block entirely {{- if empty (trim (file.Block "requires")) }} require ( github.com/pkg/errors v0.9.1 diff --git a/templates/manifest.yaml.tpl b/templates/manifest.yaml.tpl index b722fbc..dffbc76 100644 --- a/templates/manifest.yaml.tpl +++ b/templates/manifest.yaml.tpl @@ -10,12 +10,18 @@ type: templates {{- end }} arguments: ## <> + ## Add custom Stencil module arguments here + ## These arguments can be used in templates and are passed when generating projects from this module {{ file.Block "arguments" }} ## <> modules: ## <> + ## Add additional Stencil modules to include here + ## These modules will be loaded and their templates will be available during project generation {{ file.Block "modules" }} ## <> ## <> +## Add extra manifest configuration here (e.g., postRunCommand, hooks, etc.) +## This block allows you to extend the manifest with additional configuration options {{ file.Block "extra" }} ## <> From 0627561c3709427943d5c03a5d506dfc1f6e4933 Mon Sep 17 00:00:00 2001 From: "Z. Saygin Dogu" Date: Mon, 16 Feb 2026 17:13:24 +0000 Subject: [PATCH 2/3] Move comments outside the blocks --- .github/workflows/build-release.yml | 31 +++++------- .gitignore | 4 +- .mise.toml | 12 ++--- manifest.yaml | 10 ++-- .../.github/workflows/build-release.yml.tpl | 48 +++++++------------ templates/.gitignore.tpl | 3 +- templates/.goreleaser.yaml.tpl | 15 +++--- templates/.mise.toml.tpl | 10 ++-- templates/go.mod.tpl | 4 +- templates/manifest.yaml.tpl | 9 ++-- 10 files changed, 54 insertions(+), 92 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index fd9ba27..b700c4b 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -26,10 +26,9 @@ jobs: contents: write actions: read steps: + # Add CI secret/auth steps here (e.g. configure AWS, custom tokens). ## <> - ## Add additional CI secret configuration steps here - ## Use this to configure authentication or secrets needed for the build/test process - ## Example: - name: Configure AWS, uses: aws-actions/configure-aws-credentials@v2 + ## <> - name: Checkout uses: actions/checkout@v4 @@ -53,24 +52,22 @@ jobs: with: github-token: ${{ github.token }} version: "latest" + # Add auth steps for build/test here (e.g. login to private registry). ## <> - ## Add authentication configuration steps for build/test here - ## Use this to set up authentication needed before building or testing - ## Example: - name: Authenticate, uses: some-auth-action@v1 ## <> - name: Build Test repo run: mise run buildtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies + # Add env vars for the Build Test repo step here. ## <> - ## Add environment variables for the Build Test repo step here - ## Example: env: GITHUB_TOKEN: ${{ secrets.CUSTOM_TOKEN }} + ## <> - name: Run Tests run: mise run runtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies + # Add env vars for the Run Tests step here. ## <> - ## Add environment variables for the Run Tests step here - ## Example: env: GITHUB_TOKEN: ${{ secrets.CUSTOM_TOKEN }} + ## <> - name: Install JS Deps run: pnpm install @@ -78,20 +75,17 @@ jobs: run: mise run gentable env: # Fill in GH_TOKEN env with a different token here if you need a custom token to read module dependencies + # Override token for README updates here. Default: GH_TOKEN from github.token. ## <> - ## Override the GitHub token used for README updates here - ## Default: GH_TOKEN: ${{ github.token }} - ## Example: GH_TOKEN: ${{ secrets.CUSTOM_GH_TOKEN }} GH_TOKEN: ${{ github.token }} ## <> - name: Commit back any changes uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 #v5 with: commit_message: Update README.md manifest options table + # Add extra build/test steps here (run after standard build and test). ## <> - ## Add additional build/test steps here - ## These steps will run after the standard build and test steps - ## Example: - name: Custom Step, run: echo "Custom action" + ## <> build-release: @@ -128,8 +122,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: npx semantic-release + # Add additional workflow jobs here (alongside build-and-test and build-release). ## <> - ## Add additional GitHub Actions jobs here - ## These jobs will run alongside the build-and-test and build-release jobs - ## Example: my-custom-job: name: Custom Job, runs-on: ubuntu-latest, steps: [...] + ## <> diff --git a/.gitignore b/.gitignore index d3efe5b..943f551 100644 --- a/.gitignore +++ b/.gitignore @@ -54,7 +54,7 @@ tests/native/* !tests/template tests/template/* !tests/template/stencil.yaml +# Add additional gitignore patterns here (e.g. "*.log", "custom-dir/"). ## <> -## Add additional gitignore patterns here (e.g., "*.log", "custom-dir/") -## These patterns will be added to the .gitignore file + ## <> diff --git a/.mise.toml b/.mise.toml index 6ef964f..c45dd45 100644 --- a/.mise.toml +++ b/.mise.toml @@ -1,9 +1,9 @@ [tools] nodejs = "lts" pnpm = "latest" +# Add additional tool versions here (e.g. rust = "1.75"). Installed via mise alongside defaults. ## <> -## Add additional tool versions here (e.g., "rust = '1.75'", "python = '3.11'") -## These will be installed via mise alongside the default tools + ## <> # Template module tasks @@ -30,10 +30,8 @@ done [tasks.runtest] description = 'Run the tests' dir = "tests" +# Customize test runner: override run command and/or add env vars for the runtest task. ## <> -## Customize the test runner configuration here -## This block allows you to override the default test execution command -## You can add environment variables, change the test directory, or modify the test command run = """ #!/usr/bin/env bash cd native @@ -47,7 +45,7 @@ mise run test description = 'Generate the README.md table of arguments' run = "node scripts/yamltotable.js" +# Add custom mise tasks here (e.g. [tasks.mytask] description = "...", run = "..."). ## <> -## Add custom mise tasks here (e.g., [tasks.mytask] description = "...", run = "...") -## These tasks will be available via 'mise run ' + ## <> diff --git a/manifest.yaml b/manifest.yaml index 09d4d6c..83b33de 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -1,9 +1,8 @@ name: github.com/udemy/stencil-module-base type: templates arguments: + # Add custom Stencil module arguments here. Used in templates when generating projects. ## <> - ## Add custom Stencil module arguments here - ## These arguments can be used in templates and are passed when generating projects from this module nativeModule: required: false description: Does this module include native module golang code? @@ -37,13 +36,12 @@ arguments: description: package.json scripts to add to the generated package.json (key/value map) ## <> modules: + # Add additional Stencil modules to include. Loaded and available during project generation. ## <> - ## Add additional Stencil modules to include here - ## These modules will be loaded and their templates will be available during project generation + ## <> +# Add extra manifest config here (e.g. postRunCommand, hooks). ## <> -## Add extra manifest configuration here (e.g., postRunCommand, hooks, etc.) -## This block allows you to extend the manifest with additional configuration options postRunCommand: - name: Install/Update pnpm deps to lockfile command: "pnpm install --no-frozen-lockfile" diff --git a/templates/.github/workflows/build-release.yml.tpl b/templates/.github/workflows/build-release.yml.tpl index ad34cbd..488c554 100644 --- a/templates/.github/workflows/build-release.yml.tpl +++ b/templates/.github/workflows/build-release.yml.tpl @@ -36,11 +36,9 @@ jobs: contents: write actions: read steps: + # Add CI secret/auth steps here (e.g. configure AWS, custom tokens). ## <> - ## Add additional CI secret configuration steps here - ## Use this to configure authentication or secrets needed for the build/test process - ## Example: - name: Configure AWS, uses: aws-actions/configure-aws-credentials@v2 - {{ file.Block "getMoreCiSecrets" }} +{{ file.Block "getMoreCiSecrets" }} ## <> - name: Checkout uses: actions/checkout@v4 @@ -82,10 +80,9 @@ jobs: run: mise run build - name: Run Go Tests run: go run gotest.tools/gotestsum@latest + # Add env vars for Go tests here (e.g. TEST_DB_URL). ## <> - ## Add environment variables for Go tests here - ## Example: env: TEST_DB_URL: ${{ secrets.TEST_DB_URL }} - {{ file.Block "gotestvars" }} +{{ file.Block "gotestvars" }} ## <> {{- end }} {{- if stencil.Arg "templateModule" }} @@ -94,27 +91,23 @@ jobs: with: github-token: {{ "${{ github.token }}" }} version: 'latest' + # Add auth steps for build/test here (e.g. login to private registry). ## <> - ## Add authentication configuration steps for build/test here - ## Use this to set up authentication needed before building or testing - ## Example: - name: Authenticate, uses: some-auth-action@v1 - {{ file.Block "buildtestauth" }} +{{ file.Block "buildtestauth" }} ## <> - name: Build Test repo run: mise run buildtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies + # Add env vars for the Build Test repo step here. ## <> - ## Add environment variables for the Build Test repo step here - ## Example: env: GITHUB_TOKEN: ${{ secrets.CUSTOM_TOKEN }} - {{ file.Block "buildTestEnvVars" }} +{{ file.Block "buildTestEnvVars" }} ## <> - name: Run Tests run: mise run runtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies + # Add env vars for the Run Tests step here. ## <> - ## Add environment variables for the Run Tests step here - ## Example: env: GITHUB_TOKEN: ${{ secrets.CUSTOM_TOKEN }} - {{ file.Block "runTestEnvVars" }} +{{ file.Block "runTestEnvVars" }} ## <> - name: Install JS Deps run: pnpm install @@ -122,10 +115,8 @@ jobs: run: mise run gentable env: # Fill in GH_TOKEN env with a different token here if you need a custom token to read module dependencies + # Override token for README updates here. Default: GH_TOKEN from github.token. ## <> - ## Override the GitHub token used for README updates here - ## Default: GH_TOKEN: ${{ github.token }} - ## Example: GH_TOKEN: ${{ secrets.CUSTOM_GH_TOKEN }} {{- if empty (file.Block "readmeUpdateGhToken") }} GH_TOKEN: {{ "${{ github.token }}" }} {{- else }} @@ -136,11 +127,9 @@ jobs: uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 #v5 with: commit_message: Update README.md manifest options table + # Add extra build/test steps here (run after standard build and test). ## <> - ## Add additional build/test steps here - ## These steps will run after the standard build and test steps - ## Example: - name: Custom Step, run: echo "Custom action" - {{ file.Block "buildteststeps" }} +{{ file.Block "buildteststeps" }} ## <> {{- end }} @@ -210,10 +199,9 @@ jobs: args: release --release-notes tempchangelog.md --clean env: GITHUB_TOKEN: {{ "${{ secrets.GITHUB_TOKEN }}" }} + # Add env vars for goreleaser here (e.g. CUSTOM_VAR from secrets). ## <> - ## Add environment variables for goreleaser here - ## Example: CUSTOM_VAR: ${{ secrets.CUSTOM_VAR }} - {{ file.Block "goreleaserEnvVars" }} +{{ file.Block "goreleaserEnvVars" }} ## <> {{- else }} - name: Install JS Deps @@ -224,9 +212,7 @@ jobs: run: npx semantic-release {{- end }} + # Add additional workflow jobs here (alongside build-and-test and build-release). ## <> - ## Add additional GitHub Actions jobs here - ## These jobs will run alongside the build-and-test and build-release jobs - ## Example: my-custom-job: name: Custom Job, runs-on: ubuntu-latest, steps: [...] - {{ file.Block "extraActions" }} +{{ file.Block "extraActions" }} ## <> diff --git a/templates/.gitignore.tpl b/templates/.gitignore.tpl index 5ef775e..5780a00 100644 --- a/templates/.gitignore.tpl +++ b/templates/.gitignore.tpl @@ -54,8 +54,7 @@ tests/{{ $entry.Name }}/* {{ end -}} {{ end -}} {{ end -}} +# Add additional gitignore patterns here (e.g. "*.log", "custom-dir/"). ## <> -## Add additional gitignore patterns here (e.g., "*.log", "custom-dir/") -## These patterns will be added to the .gitignore file {{ file.Block "ignores" }} ## <> diff --git a/templates/.goreleaser.yaml.tpl b/templates/.goreleaser.yaml.tpl index 712a806..3c8bfcf 100644 --- a/templates/.goreleaser.yaml.tpl +++ b/templates/.goreleaser.yaml.tpl @@ -14,29 +14,26 @@ builds: ldflags: - -s - -w + # Add extra linker flags for the plugin build (e.g. -X main.version={{ .Version }}). ## <> - ## Add additional linker flags for the plugin build here - ## Example: -X main.version={{ .Version }} - {{ file.Block "pluginLdflags" }} +{{ file.Block "pluginLdflags" }} ## <> env: - CGO_ENABLED=0 goarch: - amd64 - arm64 + # Add extra architectures to build (e.g. "386", "arm"). Defaults: amd64, arm64. ## <> - ## Add additional architectures to build for here (e.g., "386", "arm") - ## Default architectures are amd64 and arm64 - {{ file.Block "pluginExtraArch" }} +{{ file.Block "pluginExtraArch" }} ## <> goos: - linux - darwin - windows + # Add extra OS targets to build (e.g. "freebsd", "openbsd"). Defaults: linux, darwin, windows. ## <> - ## Add additional operating systems to build for here (e.g., "freebsd", "openbsd") - ## Default operating systems are linux, darwin, and windows - {{ file.Block "pluginExtraOS" }} +{{ file.Block "pluginExtraOS" }} ## <> ignore: - goos: windows diff --git a/templates/.mise.toml.tpl b/templates/.mise.toml.tpl index 54f4cd7..cd15de0 100644 --- a/templates/.mise.toml.tpl +++ b/templates/.mise.toml.tpl @@ -10,9 +10,8 @@ goreleaser = "latest" "go:golang.org/x/tools/cmd/goimports" = "latest" "go:github.com/thenativeweb/get-next-version" = "latest" {{- end }} +# Add additional tool versions here (e.g. rust = "1.75"). Installed via mise alongside defaults. ## <> -## Add additional tool versions here (e.g., "rust = '1.75'", "python = '3.11'") -## These will be installed via mise alongside the default tools {{ file.Block "additionalTools" }} ## <> @@ -77,10 +76,8 @@ done [tasks.runtest] description = 'Run the tests' dir = "tests" +# Customize test runner: override run command and/or add env vars for the runtest task. ## <> -## Customize the test runner configuration here -## This block allows you to override the default test execution command -## You can add environment variables, change the test directory, or modify the test command {{- if (empty (file.Block "runTests")) }} env = {ENV_VAR_NAME = 'hooray'} # env vars for the script run = """ @@ -97,8 +94,7 @@ echo "Tests are running" description = 'Generate the README.md table of arguments' run = "node scripts/yamltotable.js" +# Add custom mise tasks here (e.g. [tasks.mytask] description = "...", run = "..."). ## <> -## Add custom mise tasks here (e.g., [tasks.mytask] description = "...", run = "...") -## These tasks will be available via 'mise run ' {{ file.Block "tasks" }} ## <> diff --git a/templates/go.mod.tpl b/templates/go.mod.tpl index e84a6b9..b3afb53 100644 --- a/templates/go.mod.tpl +++ b/templates/go.mod.tpl @@ -5,10 +5,8 @@ module github.com/{{ stencil.Arg "githubOrg" }}/{{ .Config.Name }} go 1.25 +// Add extra Go module dependencies here. If empty, default require block is used; if set, it replaces the default. // <> -// Add additional Go module dependencies here -// If this block is empty, default dependencies will be used -// If you provide content, it will replace the default require block entirely {{- if empty (trim (file.Block "requires")) }} require ( github.com/pkg/errors v0.9.1 diff --git a/templates/manifest.yaml.tpl b/templates/manifest.yaml.tpl index dffbc76..787246e 100644 --- a/templates/manifest.yaml.tpl +++ b/templates/manifest.yaml.tpl @@ -9,19 +9,16 @@ type: templates {{- fail "Either templateModule or nativeModule must be true" }} {{- end }} arguments: + # Add custom Stencil module arguments here. Used in templates when generating projects. ## <> - ## Add custom Stencil module arguments here - ## These arguments can be used in templates and are passed when generating projects from this module {{ file.Block "arguments" }} ## <> modules: + # Add additional Stencil modules to include. Loaded and available during project generation. ## <> - ## Add additional Stencil modules to include here - ## These modules will be loaded and their templates will be available during project generation {{ file.Block "modules" }} ## <> +# Add extra manifest config here (e.g. postRunCommand, hooks). ## <> -## Add extra manifest configuration here (e.g., postRunCommand, hooks, etc.) -## This block allows you to extend the manifest with additional configuration options {{ file.Block "extra" }} ## <> From 9ab09576c6315fb92f32a63c00308077ec91404a Mon Sep 17 00:00:00 2001 From: "Z. Saygin Dogu" Date: Mon, 16 Feb 2026 17:16:14 +0000 Subject: [PATCH 3/3] Fix build issue --- templates/.goreleaser.yaml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/.goreleaser.yaml.tpl b/templates/.goreleaser.yaml.tpl index 3c8bfcf..441142f 100644 --- a/templates/.goreleaser.yaml.tpl +++ b/templates/.goreleaser.yaml.tpl @@ -14,7 +14,7 @@ builds: ldflags: - -s - -w - # Add extra linker flags for the plugin build (e.g. -X main.version={{ .Version }}). + # Add extra linker flags for the plugin build (e.g. -X main.version=1.0.0). ## <> {{ file.Block "pluginLdflags" }} ## <>