Last active
April 27, 2023 06:16
-
-
Save lukethacoder/9e863146c4f436428e1ccdfd78ec585a to your computer and use it in GitHub Desktop.
SFDX Project VS Code Tasks. 2023 Updated to the new sf cli. based on https://gist.github.com/douglascayers/097a885727a0afe583122e9dc85dd3a7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "SFDX: Deploy Current File", | |
"type": "shell", | |
"command": "sf", | |
"args": [ | |
"project", | |
"deploy", | |
"start", | |
"--source-dir", | |
"${relativeFile}", | |
"--wait", | |
"2", | |
"-o", | |
"YOUR_ORG_ALIAS_HERE" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: Retrieve Current File", | |
"type": "shell", | |
"command": "sf", | |
"args": [ | |
"project", | |
"retrieve", | |
"start", | |
"--source-dir", | |
"${relativeFile}", | |
"--wait", | |
"2", | |
"-o", | |
"YOUR_ORG_ALIAS_HERE" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: Delete Current File", | |
"type": "shell", | |
"command": "sf", | |
"args": [ | |
"project", | |
"delete", | |
"source", | |
"--source-dir", | |
"${relativeFile}", | |
"--wait", | |
"2", | |
"-o", | |
"YOUR_ORG_ALIAS_HERE" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: Deploy Folder", | |
"type": "shell", | |
"command": "sf", | |
"args": [ | |
"project", | |
"deploy", | |
"start", | |
"--source-dir", | |
"${input:sourcePath}", | |
"--wait", | |
"2", | |
"-o", | |
"YOUR_ORG_ALIAS_HERE" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: Retrieve Folder", | |
"type": "shell", | |
"command": "sf", | |
"args": [ | |
"project", | |
"retrieve", | |
"start", | |
"--source-dir", | |
"${input:sourcePath}", | |
"--wait", | |
"2", | |
"-o", | |
"YOUR_ORG_ALIAS_HERE" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: Delete Folder", | |
"type": "shell", | |
"command": "sf", | |
"args": [ | |
"project", | |
"delete", | |
"source", | |
"--source-dir", | |
"${input:sourcePath}", | |
"--wait", | |
"2", | |
"-o", | |
"YOUR_ORG_ALIAS_HERE" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: Run Current Apex", | |
"type": "shell", | |
"command": "sf", | |
"args": [ | |
"apex", | |
"run", | |
"-f", | |
"${relativeFile}", | |
"-o", | |
"YOUR_ORG_ALIAS_HERE" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: echo", | |
"type": "shell", | |
"group": "build", | |
"command": "echo", | |
"args": ["YOUR_ORG_ALIAS_HERE"], | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
} | |
], | |
"inputs": [ | |
{ | |
"id": "sourcePath", | |
"type": "promptString", | |
"description": "Folder path to source metadata", | |
"default": "force-app" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment