Skip to content

Commit fd6adbd

Browse files
committed
Adds new problem matchers for better debugging
1 parent 754ffc4 commit fd6adbd

File tree

3 files changed

+28
-92
lines changed

3 files changed

+28
-92
lines changed

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// See http://go.microsoft.com/fwlink/?LinkId=827846
33
// for the documentation about the extensions.json format
44
"recommendations": [
5+
"eamodio.tsl-problem-matcher",
56
"eg2.tslint",
67
"esbenp.prettier-vscode",
78
"msjsdiag.debugger-for-chrome",

.vscode/tasks.json

Lines changed: 7 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -20,56 +20,7 @@
2020
"type": "npm",
2121
"script": "build",
2222
"group": "build",
23-
"problemMatcher": [
24-
{
25-
"fileLocation": "absolute",
26-
"owner": "typescript",
27-
"pattern": [
28-
{
29-
"regexp": "\\[tsl\\] ERROR in (.*)?\\((\\d+),(\\d+)\\)",
30-
"file": 1,
31-
"line": 2,
32-
"column": 3
33-
},
34-
{
35-
"regexp": "\\s*TS\\d+:\\s*(.*)",
36-
"message": 1
37-
}
38-
],
39-
"severity": "error",
40-
"source": "ts"
41-
},
42-
{
43-
"fileLocation": "relative",
44-
"owner": "typescript",
45-
"pattern": [
46-
{
47-
"regexp": "WARNING in (.*)",
48-
"file": 1
49-
},
50-
{
51-
"regexp": "Module Warning (.*)"
52-
},
53-
{
54-
"regexp": "\\[(\\d+), (\\d+)\\]: (.*)",
55-
"line": 1,
56-
"column": 2,
57-
"message": 3
58-
}
59-
],
60-
"severity": "warning",
61-
"source": "tslint",
62-
"background": {
63-
"activeOnStart": true,
64-
"beginsPattern": {
65-
"regexp": "webpack is watching the files..."
66-
},
67-
"endsPattern": {
68-
"regexp": "Built at\\:(.*)"
69-
}
70-
}
71-
}
72-
]
23+
"problemMatcher": ["$ts-webpack", "$tslint-webpack"]
7324
},
7425
{
7526
"type": "npm",
@@ -87,59 +38,27 @@
8738
"isBackground": true,
8839
"problemMatcher": [
8940
{
41+
"base": "$ts-webpack",
9042
"fileLocation": "absolute",
91-
"owner": "typescript",
92-
"pattern": [
93-
{
94-
"regexp": "\\[tsl\\] ERROR in (.*)?\\((\\d+),(\\d+)\\)",
95-
"file": 1,
96-
"line": 2,
97-
"column": 3
98-
},
99-
{
100-
"regexp": "\\s*TS\\d+:\\s*(.*)",
101-
"message": 1
102-
}
103-
],
104-
"severity": "error",
105-
"source": "ts",
10643
"background": {
10744
"activeOnStart": true,
10845
"beginsPattern": {
109-
"regexp": "webpack is watching the files..."
46+
"regexp": "Child extension:"
11047
},
11148
"endsPattern": {
112-
"regexp": "Built at\\:(.*)"
49+
"regexp": "Built at: .*"
11350
}
11451
}
11552
},
11653
{
117-
"fileLocation": "relative",
118-
"owner": "typescript",
119-
"pattern": [
120-
{
121-
"regexp": "WARNING in (.*)",
122-
"file": 1
123-
},
124-
{
125-
"regexp": "Module Warning (.*)"
126-
},
127-
{
128-
"regexp": "\\[(\\d+), (\\d+)\\]: (.*)",
129-
"line": 1,
130-
"column": 2,
131-
"message": 3
132-
}
133-
],
134-
"severity": "warning",
135-
"source": "tslint",
54+
"base": "$tslint-webpack",
13655
"background": {
13756
"activeOnStart": true,
13857
"beginsPattern": {
139-
"regexp": "webpack is watching the files..."
58+
"regexp": "Child extension:"
14059
},
14160
"endsPattern": {
142-
"regexp": "Built at\\:(.*)"
61+
"regexp": "Built at: .*"
14362
}
14463
}
14564
}

webpack.config.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = function(env, argv) {
1717
};
1818

1919
function getExtensionConfig(env) {
20-
const plugins = [new CleanPlugin(['out'])];
20+
const plugins = [new CleanPlugin(['out'], { verbose: false })];
2121

2222
return {
2323
name: 'extension',
@@ -50,7 +50,15 @@ function getExtensionConfig(env) {
5050
]
5151
},
5252
plugins: plugins,
53-
stats: { all: false, assets: true, builtAt: true, errors: true, timings: true, warnings: true }
53+
stats: {
54+
all: false,
55+
assets: true,
56+
builtAt: true,
57+
env: true,
58+
errors: true,
59+
timings: true,
60+
warnings: true
61+
}
5462
};
5563
}
5664

@@ -62,7 +70,7 @@ function getUIConfig(env) {
6270
}
6371

6472
const plugins = [
65-
new CleanPlugin(clean),
73+
new CleanPlugin(clean, { verbose: false }),
6674
new MiniCssExtractPlugin({
6775
filename: '[name].css'
6876
}),
@@ -207,6 +215,14 @@ function getUIConfig(env) {
207215
]
208216
},
209217
plugins: plugins,
210-
stats: { all: false, assets: true, builtAt: true, errors: true, timings: true, warnings: true }
218+
stats: {
219+
all: false,
220+
assets: true,
221+
builtAt: true,
222+
env: true,
223+
errors: true,
224+
timings: true,
225+
warnings: true
226+
}
211227
};
212228
}

0 commit comments

Comments
 (0)