完善开发环境配置

This commit is contained in:
孟宁
2024-11-24 06:33:09 +00:00
parent 428bed52c8
commit e696decaf6
4 changed files with 20 additions and 21 deletions

View File

@@ -6,7 +6,7 @@
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bookworm", "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bookworm",
"features": { "features": {
"ghcr.io/devcontainers/features/git:1": {} "ghcr.io/devcontainers/features/git:1": {}
} },
// Features to add to the dev container. More info: https://containers.dev/features. // Features to add to the dev container. More info: https://containers.dev/features.
// "features": {}, // "features": {},
@@ -15,7 +15,7 @@
// "forwardPorts": [], // "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created. // Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install", "postCreateCommand": "npm install"
// Configure tool-specific properties. // Configure tool-specific properties.
// "customizations": {}, // "customizations": {},

2
.vscode/launch.json vendored
View File

@@ -8,7 +8,7 @@
"request": "launch", "request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"], "args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"sourceMaps": true, "sourceMaps": true,
"preLaunchTask": "npm: compile", "preLaunchTask": "npm: build",
"outFiles": ["${workspaceFolder}/dist/**/*.js"], "outFiles": ["${workspaceFolder}/dist/**/*.js"],
}, },
{ {

27
.vscode/tasks.json vendored
View File

@@ -11,25 +11,24 @@
}, },
{ {
"type": "npm", "type": "npm",
"script": "format", "script": "package",
"problemMatcher": [], "problemMatcher": [],
"label": "npm: format", "label": "npm: package",
"detail": "prettier --single-quote --print-width 88 --write \"src/**/*.js\"" "detail": "webpack --mode production && vsce package"
}, },
{ {
"type": "npm", "type": "npm",
"script": "watch", "script": "watch",
"problemMatcher": "$ts-webpack-watch", "problemMatcher": [],
"isBackground": true, "label": "npm: watch",
"presentation": { "detail": "webpack --mode production --watch"
"reveal": "never", },
"group": "watchers" {
}, "type": "npm",
"group": { "script": "format",
"kind": "build", "problemMatcher": [],
"isDefault": true "label": "npm: format",
} "detail": "eslint src --ext ts"
}, },
] ]
} }

View File

@@ -95,11 +95,11 @@
} }
}, },
"scripts": { "scripts": {
"compile": "webpack --mode production", "build": "webpack --mode production",
"vscode:package": "webpack --mode production && vsce package", "package": "webpack --mode production && vsce package",
"vscode:publish": "vsce publish", "publish": "vsce publish",
"watch": "webpack --mode production --watch", "watch": "webpack --mode production --watch",
"lint": "eslint src --ext ts" "format": "eslint src --ext ts"
}, },
"dependencies": { "dependencies": {
"fs-plus": "~3.1.1", "fs-plus": "~3.1.1",