Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for User Defined Templates #641

Open
max-verifiable opened this issue Dec 5, 2024 · 0 comments
Open

Support for User Defined Templates #641

max-verifiable opened this issue Dec 5, 2024 · 0 comments

Comments

@max-verifiable
Copy link

Describe the solution you'd like
Joined a new company and we're using salesforce enterprise patterns (fflib), which requires a lot of boilerplate. I'd like to be able to use the CLI to generate apex classes, but the issue is that I'm unable to customize the classes much so it isn't very useful.

The plugin actually supports this by setting sf config set org-custom-metadata-templates PATH_TO_CUSTOM_TEMPLATES. This allows me to define a directory and customize templates. However, I'm only able to have the base list of template names (ApexException, ApexUnitTest, BasicUnitTest, DefaultApexClass, InboundEmailService). I believe this could be fixed fairly easily in @salesforce/templates dependency inside the createUtil.js class. In here, they would need to reference the org-custom-metadata-templates path if it is available to collect the templates defined by the user.

Describe alternatives you've considered
There are various packages out there that have tried this, but they dont support the current versions of the sf cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant