Skip to content

Commit 044092a

Browse files
committed
Migrate to webpack
1 parent 56edbb3 commit 044092a

19 files changed

+5133
-719
lines changed

Diff for: .gitignore

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
out
2-
node_modules
3-
npm-debug.log
4-
.vscode-test
1+
out
2+
dist
3+
node_modules
4+
npm-debug.log
5+
.vscode-test

Diff for: .vscode/launch.json

+26-48
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,26 @@
1-
// A launch configuration that compiles the extension and then opens it inside a new window
2-
{
3-
"version": "0.1.0",
4-
"configurations": [
5-
{
6-
"name": "Attach to Server",
7-
"type": "node",
8-
"request": "attach",
9-
"port": 6004,
10-
"sourceMaps": true,
11-
"outFiles": [
12-
"${workspaceRoot}/out/src/**/*.js"
13-
],
14-
"preLaunchTask": "npm"
15-
},
16-
{
17-
"name": "Launch Extension",
18-
"type": "extensionHost",
19-
"request": "launch",
20-
"runtimeExecutable": "${execPath}",
21-
"args": [
22-
"--extensionDevelopmentPath=${workspaceRoot}"
23-
],
24-
"stopOnEntry": false,
25-
"sourceMaps": true,
26-
"outFiles": [
27-
"${workspaceRoot}/out/src/**/*.js"
28-
],
29-
"preLaunchTask": "npm"
30-
},
31-
{
32-
"name": "Launch Tests",
33-
"type": "extensionHost",
34-
"request": "launch",
35-
"runtimeExecutable": "${execPath}",
36-
"args": [
37-
"--extensionDevelopmentPath=${workspaceRoot}",
38-
"--extensionTestsPath=${workspaceRoot}/out/test"
39-
],
40-
"stopOnEntry": false,
41-
"sourceMaps": true,
42-
"outFiles": [
43-
"${workspaceRoot}/out/test/**/*.js"
44-
],
45-
"preLaunchTask": "npm"
46-
}
47-
]
48-
}
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
{
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "Launch Extension",
7+
"type": "extensionHost",
8+
"request": "launch",
9+
"runtimeExecutable": "${execPath}",
10+
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "${workspaceFolder}/testfiles"],
11+
"stopOnEntry": false,
12+
"sourceMaps": true,
13+
"outFiles": ["${workspaceRoot}/dist/**/*.js"]
14+
},
15+
{
16+
"name": "Attach to Server",
17+
"type": "node",
18+
"request": "attach",
19+
"port": 6004,
20+
"sourceMaps": true,
21+
"address": "localhost",
22+
"protocol": "inspector",
23+
"outFiles": ["${workspaceRoot}/dist/**/*.js"]
24+
}
25+
]
26+
}

Diff for: .vscode/settings.json

+11-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// Place your settings in this file to overwrite default and user settings.
2-
{
3-
"editor.tabSize": 2,
4-
"editor.insertSpaces": true,
5-
/*"files.exclude": {
6-
"node_modules": true,
7-
"out": false // set this to true to hide the "out" folder with the compiled JS files
8-
},
9-
"search.exclude": {
10-
"out": true // set this to false to include "out" folder in search results
11-
},*/
12-
"typescript.tsdk": "./node_modules/typescript/lib" // we want to use the TS server from our node_modules folder to control its version
13-
}
1+
{
2+
"editor.insertSpaces": true,
3+
"editor.formatOnSave": true,
4+
"files.exclude": {
5+
"out": false
6+
},
7+
"search.exclude": {
8+
"out": true
9+
},
10+
"typescript.tsdk": "./node_modules/typescript/lib"
11+
}

Diff for: .vscode/tasks.json

+32-28
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
1-
// Available variables which can be used inside of strings.
2-
// ${workspaceRoot}: the root folder of the team
3-
// ${file}: the current opened file
4-
// ${fileBasename}: the current opened file's basename
5-
// ${fileDirname}: the current opened file's dirname
6-
// ${fileExtname}: the current opened file's extension
7-
// ${cwd}: the current working directory of the spawned process
8-
// A task runner that calls a custom npm script that compiles the extension.
9-
{
10-
"version": "0.1.0",
11-
// we want to run npm
12-
"command": "npm",
13-
// the command is a shell script
14-
"isShellCommand": true,
15-
// show the output window only if unrecognized errors occur.
16-
"showOutput": "silent",
17-
// we run the custom script "compile" as defined in package.json
18-
"args": [
19-
"run",
20-
"compile",
21-
"--loglevel",
22-
"silent"
23-
],
24-
// The tsc compiler is started in watching mode
25-
"isBackground": true,
26-
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
27-
"problemMatcher": "$tsc-watch"
28-
}
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "webpack-dev",
9+
"isBackground": true,
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
},
14+
"presentation": {
15+
"reveal": "never",
16+
"panel": "dedicated"
17+
},
18+
"problemMatcher": ["$tsc-watch"]
19+
},
20+
{
21+
"type": "npm",
22+
"script": "webpack",
23+
"isBackground": false,
24+
"group": "build",
25+
"presentation": {
26+
"reveal": "never",
27+
"panel": "dedicated"
28+
},
29+
"problemMatcher": ["$tsc"]
30+
}
31+
]
32+
}

Diff for: .vscodeignore

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.vscode/**
2-
.vscode-test/**
32
typings/**
4-
out/test/**
3+
out/**
54
test/**
65
src/**
76
grunt/**
@@ -11,3 +10,9 @@ gruntfile.js
1110
.gitignore
1211
tsconfig.json
1312
vsc-extension-quickstart.md
13+
testfiles
14+
node_modules
15+
.devcontainer
16+
webpack.config.js
17+
!images
18+
!dist

0 commit comments

Comments
 (0)