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

View File

@ -122,8 +122,8 @@
"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": "node ./build/yaml-to-json.mjs",
"dev-client": "webpack --mode development --config webpack.config.client.js",
"dev-server": "webpack --mode development --config webpack.config.server.js",
"dev-client": "webpack --mode development --watch --config webpack.config.client.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-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;
}
// 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 {
private _data: number[] = [];
private _builder: SemanticTokensBuilder;