Skip to content

Make global variables available from .args files #339

Description

@rin-st

Start with solidityFramework variable

Current idea (copying part of Shiv's comment here #331 (comment)):

Umm just thinking out loud, what if for extension developers in .args.mjs file we suggest them to export a function? for example:

// page.tsx.args.mjs

export const description = ({ solidityFramework }) => {
 return `${solidityFramwork} === "hardhat" ? "hardhat" : "foundry`
}

And while building the final page in withDefaults function we check if it's direct string we render it but extension developer is calling function then we pass the solidityFramework to that function and call it?

Like extension developer can expose us the args in two way one by passing the string directly or by passing a function which returns string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions