webpack: enable watch in develop mode

This commit is contained in:
全卓 2022-11-27 16:09:14 +08:00
parent 10ffc04c10
commit 201bf2fdc8
3 changed files with 4 additions and 17 deletions

6
.vscode/launch.json vendored
View File

@ -14,8 +14,7 @@
], ],
"outFiles": [ "outFiles": [
"${workspaceFolder}/dist/**/*.js" "${workspaceFolder}/dist/**/*.js"
], ]
"preLaunchTask": "${defaultBuildTask}"
}, },
{ {
"name": "Attach to Server", "name": "Attach to Server",
@ -25,8 +24,7 @@
"restart": true, "restart": true,
"outFiles": [ "outFiles": [
"${workspaceRoot}/dist/**/*.js" "${workspaceRoot}/dist/**/*.js"
], ]
"preLaunchTask": "${defaultBuildTask}"
}, },
{ {
"name": "Extension Tests", "name": "Extension Tests",

View File

@ -122,8 +122,8 @@
"grammar-cmakecache": "npx js-yaml ./syntaxes/cmakecache.tmLanguage.yml > ./syntaxes/cmakecache.tmLanguage.json", "grammar-cmakecache": "npx js-yaml ./syntaxes/cmakecache.tmLanguage.yml > ./syntaxes/cmakecache.tmLanguage.json",
"grammar-cmdsignature": "npx js-yaml ./syntaxes/cmdsignature.tmLanguage.yml > ./syntaxes/cmdsignature.tmLanguage.json", "grammar-cmdsignature": "npx js-yaml ./syntaxes/cmdsignature.tmLanguage.yml > ./syntaxes/cmdsignature.tmLanguage.json",
"grammar": "node ./build/yaml-to-json.mjs", "grammar": "node ./build/yaml-to-json.mjs",
"dev-client": "webpack --mode development --config webpack.config.client.js", "dev-client": "webpack --mode development --watch --config webpack.config.client.js",
"dev-server": "webpack --mode development --config webpack.config.server.js", "dev-server": "webpack --mode development --watch --config webpack.config.server.js",
"prod-client": "webpack --mode production --config webpack.config.client.js --devtool hidden-source-map", "prod-client": "webpack --mode production --config webpack.config.client.js --devtool hidden-source-map",
"prod-server": "webpack --mode production --config webpack.config.server.js --devtool hidden-source-map" "prod-server": "webpack --mode production --config webpack.config.server.js --devtool hidden-source-map"
}, },

View File

@ -70,17 +70,6 @@ export function getTokenModifiers(): string[] {
return tokenModifiers; return tokenModifiers;
} }
// export function getTokenBuilder(document: TextDocument): SemanticTokensBuilder {
// let result = tokenBuilders.get(document.uri);
// if (result !== undefined) {
// return result;
// }
// result = new SemanticTokensBuilder();
// tokenBuilders.set(document.uri, result);
// return result;
// }
export class SemanticListener extends CMakeListener { export class SemanticListener extends CMakeListener {
private _data: number[] = []; private _data: number[] = [];
private _builder: SemanticTokensBuilder; private _builder: SemanticTokensBuilder;