Skip to content

Commit 596cb25

Browse files
committed
Added task for automatically installing all recommended extensions
Set also build script as default
1 parent 9d9793c commit 596cb25

File tree

9 files changed

+60
-13
lines changed

9 files changed

+60
-13
lines changed

.vscode/extensions.json

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
// See http://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
42
"recommendations": [
53
"dbaeumer.vscode-eslint",
64
"esbenp.prettier-vscode",

.vscode/tasks.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@
44
{
55
"type": "npm",
66
"script": "build:ts:watch",
7-
"group": "build",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
811
"problemMatcher": [],
912
"label": "npm: build:ts:watch",
1013
"detail": "tsc -b --watch",
1114
"options": {
1215
"cwd": "${workspaceFolder}/src/"
1316
}
17+
},
18+
{
19+
"label": "Install All Recommended Extensions",
20+
"type": "shell",
21+
"windows": {
22+
"command": "powershell ((node -e \"console.log(JSON.parse(require('fs').readFileSync('./.vscode/extensions.json')).recommendations.join('\\\\n'))\") -split '\\r?\\n') | ForEach-Object { code --install-extension $_ }"
23+
},
24+
"command": "node -e \"console.log(JSON.parse(require('fs').readFileSync('./.vscode/extensions.json')).recommendations.join('\\n'))\" | xargs -L 1 code --install-extension"
1425
}
1526
]
1627
}

samples/webApi/expressjs-with-esdb/.vscode/extensions.json

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
// See http://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
42
"recommendations": [
53
"dbaeumer.vscode-eslint",
64
"esbenp.prettier-vscode",

samples/webApi/expressjs-with-esdb/.vscode/tasks.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@
44
{
55
"type": "npm",
66
"script": "build:ts:watch",
7-
"group": "build",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
811
"problemMatcher": [],
912
"label": "npm: build:ts:watch",
1013
"detail": "tsc -b --watch"
14+
},
15+
{
16+
"label": "Install All Recommended Extensions",
17+
"type": "shell",
18+
"windows": {
19+
"command": "powershell ((node -e \"console.log(JSON.parse(require('fs').readFileSync('./.vscode/extensions.json')).recommendations.join('\\\\n'))\") -split '\\r?\\n') | ForEach-Object { code --install-extension $_ }"
20+
},
21+
"command": "node -e \"console.log(JSON.parse(require('fs').readFileSync('./.vscode/extensions.json')).recommendations.join('\\n'))\" | xargs -L 1 code --install-extension"
1122
}
1223
]
1324
}

samples/webApi/expressjs-with-mongodb/.vscode/extensions.json

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
// See http://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
42
"recommendations": [
53
"dbaeumer.vscode-eslint",
64
"esbenp.prettier-vscode",

samples/webApi/expressjs-with-mongodb/.vscode/tasks.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@
44
{
55
"type": "npm",
66
"script": "build:ts:watch",
7-
"group": "build",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
811
"problemMatcher": [],
912
"label": "npm: build:ts:watch",
1013
"detail": "tsc -b --watch"
14+
},
15+
{
16+
"label": "Install All Recommended Extensions",
17+
"type": "shell",
18+
"windows": {
19+
"command": "powershell ((node -e \"console.log(JSON.parse(require('fs').readFileSync('./.vscode/extensions.json')).recommendations.join('\\\\n'))\") -split '\\r?\\n') | ForEach-Object { code --install-extension $_ }"
20+
},
21+
"command": "node -e \"console.log(JSON.parse(require('fs').readFileSync('./.vscode/extensions.json')).recommendations.join('\\n'))\" | xargs -L 1 code --install-extension"
1122
}
1223
]
1324
}

samples/webApi/expressjs-with-postgresql/.vscode/tasks.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@
44
{
55
"type": "npm",
66
"script": "build:ts:watch",
7-
"group": "build",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
811
"problemMatcher": [],
912
"label": "npm: build:ts:watch",
1013
"detail": "tsc -b --watch"
14+
},
15+
{
16+
"label": "Install All Recommended Extensions",
17+
"type": "shell",
18+
"windows": {
19+
"command": "powershell ((node -e \"console.log(JSON.parse(require('fs').readFileSync('./.vscode/extensions.json')).recommendations.join('\\\\n'))\") -split '\\r?\\n') | ForEach-Object { code --install-extension $_ }"
20+
},
21+
"command": "node -e \"console.log(JSON.parse(require('fs').readFileSync('./.vscode/extensions.json')).recommendations.join('\\n'))\" | xargs -L 1 code --install-extension"
1122
}
1223
]
1324
}

src/.vscode/extensions.json

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
// See http://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
42
"recommendations": [
53
"dbaeumer.vscode-eslint",
64
"esbenp.prettier-vscode",

src/.vscode/tasks.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@
44
{
55
"type": "npm",
66
"script": "build:ts:watch",
7-
"group": "build",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
811
"problemMatcher": [],
912
"label": "npm: build:ts:watch",
1013
"detail": "tsc -b --watch"
14+
},
15+
{
16+
"label": "Install All Recommended Extensions",
17+
"type": "shell",
18+
"windows": {
19+
"command": "powershell ((node -e \"console.log(JSON.parse(require('fs').readFileSync('./.vscode/extensions.json')).recommendations.join('\\\\n'))\") -split '\\r?\\n') | ForEach-Object { code --install-extension $_ }"
20+
},
21+
"command": "node -e \"console.log(JSON.parse(require('fs').readFileSync('./.vscode/extensions.json')).recommendations.join('\\n'))\" | xargs -L 1 code --install-extension"
1122
}
1223
]
1324
}

0 commit comments

Comments
 (0)