salesforcedx-templates

Developing

Get Started

  1. Clone the repository, and cd into it.
git clone git@github.com:forcedotcom/salesforcedx-templates.git
  1. Ensure you have Yarn installed and run the following to build:
yarn install
yarn build

Branches

Merging between branches

Making Pull Requests

Take a look at CONTRIBUTING doc for making and merging pull requests.

Developing the Library

Adding a new template:

  1. Define a new template type in TemplateType, and add available template options extending TemplateOptions in library types.
  2. Create a generator extending SfdxGenerator in generators folder. Take a look at ApexClassGenerator for an example.

Consider adding a corresponding command for your new template to be invoked with the CLI in the plugin for templates here.

Testing

Run the following to test the library:

yarn test

If you are using VS Code for development, the following launch configurations are available: “Run All Tests”, “Run Current Test”, “Run Current Test Without Compile”. Have "debug.javascript.usePreview": true in your user setting enabled so you can utilize vscode-js-debug debugger. This setting is enabled by default in VS Code version 1.47.