Last active
January 30, 2024 22:27
-
-
Save douglascayers/097a885727a0afe583122e9dc85dd3a7 to your computer and use it in GitHub Desktop.
Simple tasks for Visual Studio Code to deploy/retrieve/delete the currently opened file, or an entire folder, using Salesforce CLI force:source commands.
This file contains hidden or 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": "sfdx", | |
"args": [ | |
"force:source:deploy", | |
"--sourcepath", | |
"${relativeFile}", | |
"--wait", | |
"10" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: Retrieve Current File", | |
"type": "shell", | |
"command": "sfdx", | |
"args": [ | |
"force:source:retrieve", | |
"--sourcepath", | |
"${relativeFile}", | |
"--wait", | |
"10" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: Delete Current File", | |
"type": "shell", | |
"command": "sfdx", | |
"args": [ | |
"force:source:delete", | |
"--sourcepath", | |
"${relativeFile}", | |
"--wait", | |
"10" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: Deploy Folder", | |
"type": "shell", | |
"command": "sfdx", | |
"args": [ | |
"force:source:deploy", | |
"--sourcepath", | |
"${input:sourcePath}", | |
"--wait", | |
"10" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: Retrieve Folder", | |
"type": "shell", | |
"command": "sfdx", | |
"args": [ | |
"force:source:retrieve", | |
"--sourcepath", | |
"${input:sourcePath}", | |
"--wait", | |
"10" | |
], | |
"group": "build", | |
"presentation": { | |
"reveal": "always", | |
"panel": "shared" | |
}, | |
"problemMatcher": [] | |
}, | |
{ | |
"label": "SFDX: Delete Folder", | |
"type": "shell", | |
"command": "sfdx", | |
"args": [ | |
"force:source:delete", | |
"--sourcepath", | |
"${input:sourcePath}", | |
"--wait", | |
"10" | |
], | |
"group": "build", | |
"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
It's truly amazing .