Contributing
Everyone is welcome to contribute to sfdx-hardis (even juniors: we'll assist you !)
Salesforce CLI Plugin: sfdx-hardis
- Install Node.js (recommended version)
- Install typescript by running
npm install typescript --global - Install yarn by running
npm install yarn --global - Install Salesforce DX by running
npm install @salesforce/cli --globalcommand line - Fork https://github.com/hardisgroupcom/sfdx-hardis and clone it (or just clone if you are an internal contributor)
- At the root of the repository:
- Run
yarnto install dependencies - Run
sf plugins linkto link the local sfdx-hardis to SFDX CLI - Run
tsc --watchto transpile typescript into js everytime you update a TS file
- Run
- Debug commands using
NODE_OPTIONS=--inspect-brk sf hardis:somecommand --someparameter somevalue(you can also debug commands using VsCode Sfdx-Hardis setting)
Note: To test a feature from CI, you can add the following code in your workflow before running sfdx-hardis commands:
REPO_URL="https://github.com/hardisgroupcom/sfdx-hardis.git" # or your forked repo URL
GIT_BRANCH="fixes/my-git-branch" # or the branch you want to test
TEMP_DIR=$(mktemp -d)
git clone "$REPO_URL" "$TEMP_DIR"
cd "$TEMP_DIR"
git checkout "$GIT_BRANCH"
yarn
npm install typescript --global
tsc
sf plugins link
cd -
VsCode Extension: vscode-sfdx-hardis
- Install Node.js (recommended version)
- Install typescript by running
npm install typescript --global - Install yarn by running
npm install yarn --global - Install Visual Studio Code Insiders (download here)
- Fork https://github.com/hardisgroupcom/vscode-sfdx-hardis and clone it (or just clone if you are an internal contributor)
- At the root of the repository:
- Run
yarnto install dependencies
- Run
- To test your code in the VsCode Extension:
- Open the
vscode-sfdx-hardisfolder in VsCode Insiders - Press
F5to open a new VsCode window with the extension loaded (or menu Run -> Start Debugging) - In the new window, open a Salesforce DX project
- Run commands from the command palette (Ctrl+Shift+P) or use the buttons in the panel or webviews
- Open the