Ver Fonte

chore: vscode one key to debugger config

ZhaoJun há 1 ano atrás
pai
commit
84f616a355
3 ficheiros alterados com 40 adições e 2 exclusões
  1. 0 2
      .gitignore
  2. 17 0
      .vscode/launch.json
  3. 23 0
      .vscode/tasks.json

+ 0 - 2
.gitignore

@@ -9,7 +9,6 @@ _roadhog-api-doc
 # production
 /dist
 dist.zip
-/.vscode
 
 # misc
 .DS_Store
@@ -21,7 +20,6 @@ yarn-error.log
 yarn.lock
 package-lock.json
 *bak
-.vscode
 
 # visual studio code
 .history

+ 17 - 0
.vscode/launch.json

@@ -0,0 +1,17 @@
+{
+  // Use IntelliSense to learn about possible attributes.
+  // Hover to view descriptions of existing attributes.
+  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+  "version": "0.2.0",
+  "configurations": [
+    {
+      "preLaunchTask": "yarn: start",
+      "type": "chrome",
+      "request": "launch",
+      "name": "WorkLoad",
+      "url": "http://localhost:8000",
+      "webRoot": "${workspaceFolder}",
+      "runtimeArgs": ["--auto-open-devtools-for-tabs"]
+    }
+  ]
+}

+ 23 - 0
.vscode/tasks.json

@@ -0,0 +1,23 @@
+{
+  "version": "2.0.0",
+  "tasks": [
+    {
+      "type": "npm",
+      "script": "start",
+      "label": "yarn: start",
+      "detail": "cross-env APP_TYPE=site UMI_UI=none umi dev",
+      "isBackground": true,
+      "problemMatcher": {
+        "owner": "yarn",
+        "pattern": {
+          "regexp": ""
+        },
+        "background": {
+          "activeOnStart": true,
+          "beginsPattern": "cross-env APP_TYPE=site UMI_UI=none umi dev",
+          "endsPattern": "Compiled successfully.+"
+        }
+      }
+    }
+  ]
+}