felangel / mason

Tools which allow developers to create and consume reusable templates called bricks.
https://docs.brickhub.dev
964 stars 98 forks source link

fix: Generating files from array not working #1267

Open andrespd99 opened 6 months ago

andrespd99 commented 6 months ago

As stated above, I'm unable to generate an array of files following the same structure as the todo example

This is the string I'm using to generate the file list:

{{#branches}}{{#snakeCase}}{{{.}}}{{/snakeCase}}_branch.dart{{/branches}}

This is the result

image

When using double moustache dot {{.}} instead of triple moustache {{{.}}}, I get the following result:

image

This is the closest I got, but well... The picture talks for itself.

What am I doing wrong? I'm sure I'm following the same pattern as in the todos example.

felangel commented 6 months ago

Hi @andrespd99 👋 Can you please share a link to a minimal reproduction sample and I’m happy to take a closer look and provide any suggestions, thanks!

andrespd99 commented 6 months ago

Hi @felangel !

Sure, here's the link to the brick's codebase.

This is the path to the template failing to generate

felangel commented 6 months ago

Hi @felangel !

Sure, here's the link to the brick's codebase.

This is the path to the template failing to generate

Thanks, I’ll have a look later today.

andrespd99 commented 6 months ago

Hello again, @felangel 👋

Did you get to look at it?

andrespd99 commented 5 months ago

Hi @felangel ! I wanted to know if you could look at it. I'm not sure if this is a bug, or I'm missing something. Sorry for the trouble

felangel commented 4 months ago

Hi @andrespd99 are you able to create a simpler reproduction sample that just includes the relevant code to illustrate the issue? It would be much easier to help if I could look at a reduced version. Does the todo example work for you locally?