Created
July 6, 2020 06:14
-
-
Save LokeshSagi/1cdad7ac2d1f289cc343b80cf15211bb to your computer and use it in GitHub Desktop.
VSCode snippet to import Custom Label in JS
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
{ | |
"importLabel": { | |
"scope": "javascript,typescript", | |
"prefix": "imp-label", | |
"body": "import $1 from '@salesforce/label/c.$2'", | |
"description": "import custom label in js" | |
} | |
} |
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
-> Click on Settings (wrench icon) and select User Snippets | |
-> Select the type of snippet (generally select 'New Global Snippet File' to create a snippet and make it available across the projects and languages) | |
-> give a snippet name | |
-> copy the code from above file (change the scope, prefix, description as required) | |
-> in the required js, ts file, start typing 'imp-label' and select the suggestion with the given decription. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment