File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ // require src\snippets.json file
2+
3+ const snippets = require ( '../src/snippets.json' ) ;
4+
5+ // snippets has this structure:
6+ // {
7+ // "Config": {
8+ // "prefix": "devproxy-config",
9+ // "body": [
10+ // "{",
11+ // "\t\"\\$schema\": \"https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v1.0/rc.schema.json\",",
12+ // "\t\"plugins\": [$1],",
13+ // "\t\"urlsToWatch\": [$2],",
14+ // "\t\"rate\": 50,",
15+ // "\t\"labelMode\": \"text\",",
16+ // "\t\"logLevel\": \"info\"",
17+ // "}"
18+ // ],
19+ // "description": "Dev Proxy config file"
20+ // }
21+ // }
22+
23+ // iterate over snippets and print out the prefix and description as a markdown table
24+ console . log ( '| Prefix | Description |' ) ;
25+ console . log ( '| ------ | ----------- |' ) ;
26+ for ( const [ key , value ] of Object . entries ( snippets ) ) {
27+ console . log ( `| \`${ value . prefix } \` | ${ value . description } |` ) ;
28+ }
You can’t perform that action at this time.
0 commit comments