Skip to content

Instantly share code, notes, and snippets.

@mejiaj
Last active August 10, 2023 20:38
Show Gist options
  • Save mejiaj/47a3268e56da73b194e04055aa9d1150 to your computer and use it in GitHub Desktop.
Save mejiaj/47a3268e56da73b194e04055aa9d1150 to your computer and use it in GitHub Desktop.
VS Code snipets for USWDS-Site Repo
//* USWDS Site snippets
//* How to
// 1. Download this file.
// 2. Go to uswds-site project root.
// 3. Place in project's `.vscode/` directory (might have to create if it doesn't exist).
// File originally created for USWDS changelog entries.
// See README on site for latest on changelogs:
// https://github.com/uswds/uswds-site/blob/main/_data/changelogs/_CHANGELOG-README.md
{
//*
//* About Snippets
//*
// Place your uswds-site workspace snippets here. Each snippet is defined
// under a snippet name and has a scope, prefix, body and description.
// Add comma separated ids of the languages where the snippet is applicable
// in the scope field.
//
// If scope is left empty or omitted, the snippet gets applied to all languages.
// The prefix is what is used to trigger the snippet and the body will be
// expanded and inserted.
//
// Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
//
// Placeholders with the same ids are connected.
//
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"New changelog": {
"scope": "yml, yaml",
"prefix": "new log",
"body": [
"title: $1",
"type: $2",
"changelogURL: $3",
"items:",
" - date: NNNN-NN-NN",
" summary: $4",
" summaryAdditional: $5 # @TODO: Delete line if field is empty.",
" isBreaking: $6",
" affectsAccessibility: $7",
" affectsAssets: $8",
" affectsContent: $9",
" affectsGuidance: $10",
" affectsJavascript: $11",
" affectsMarkup: $12",
" affectsSettings: $13",
" affectsStyles: $14",
" githubPr: $15",
" githubRepo: $16",
" versionUswds: N.N.N",
"$20"
],
"description": "Create a USWDS changelog entry."
},
"Changelog entry": {
"scope": "yml, yaml",
"prefix": "log",
"body": [
"- date: NNNN-NN-NN",
" summary: $1",
" summaryAdditional: $2 # @TODO: Delete line if field is empty.",
" isBreaking: $3",
" affectsAccessibility: $4",
" affectsAssets: $5",
" affectsContent: $6",
" affectsGuidance: $7",
" affectsJavascript: $8",
" affectsMarkup: $9",
" affectsSettings: $10",
" affectsStyles: $11",
" githubPr: $12",
" githubRepo: $13",
" versionUswds: N.N.N",
],
"description": "Create a USWDS changelog entry."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment