felangel / mason

Tools which allow developers to create and consume reusable templates called bricks.

Home Page:https://docs.brickhub.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: create an required variable so we can declare our own variable to help with repetitive lambda

VikralAIT opened this issue · comments

Description

Create a way to store lambda as variable so we can create an variable that help with repetitive lamba, example i want to create a brick that will create a page and its cubit, so rather that having to do {{name.pascalCase()}}Cubit everytime we want to mention cubit we could just write {{cubit}} which will show ExampleCubit

never mind i just realize you could do in pre gen without needed to declare it on brick.yaml first
context.vars['cubit'] = '${name.toString().toPascalCase()}Cubit';