Open pradipaub36 opened 1 year ago
Hi @pradipaub36 π Thanks for opening an issue!
Can you please elaborate a bit more? What is the Mason CLI modifying specifically?
Hi @felangel Thank you for your prompt response!
The issue I encountered with the Mason CLI is related to how it handles the Stencil template when using a specific brick that includes custom variables defined in the brick.yaml
file. The problem is that when I include my custom template under the "bricks" directory and use a brick with custom variables, the Mason CLI automatically modifies the Stencil template, even if the variables are not defined in the brick.yaml file. This behavior is not desired as it can lead to unexpected changes in the generated code.
Here's the specific scenario:
project_name
and bundle_id
.project_name
and bundle_id
variables, the Mason CLI correctly prompts me for input and generates code accordingly. However, it also modifies the Stencil template, even though the template does not define these specific variables. The result is an updated Stencil template with missing variable names like {{param.enumName}}, {{param.forceNamespaces}}, and {{param.publicAccess}}.Ideally, the Mason CLI should refrain from modifying the Stencil template unless the variables are explicitly defined in the brick.yaml file. This way, the custom template remains intact, and users can use their bricks without unintended changes to the Stencil template.
Is there any way to prevent the Mason CLI from automatically modifying the Stencil template when using custom bricks with specific variables? If not, is there a recommended approach or workaround to ensure the template remains unchanged while using custom bricks with additional variables?
Thank you for your attention to this matter, and I'm looking forward to your guidance on resolving this issue.
Description
I have created a custom template using Stencil. When I include this template under the "bricks" directory and use a specific brick, it automatically modifies the Stencil template without defining the variables in the brick.yaml file. How can I prevent this from happening?
Here is brick.yaml file content
Here is the Stencil template
Updated the Stencil template by Mason CLI
Requirements The Mason CLI should refrain from modifying the Stencil template unless the variables are defined in the brick.yaml file.