Browse Source

chore: auto launch terminal group on start

Nicolas Giard 3 years ago
parent
commit
22e1eea9f2
3 changed files with 65 additions and 2 deletions
  1. 1 2
      .vscode/extensions.json
  2. 61 0
      .vscode/tasks.json
  3. 3 0
      dev.code-workspace

+ 1 - 2
.vscode/extensions.json

@@ -1,7 +1,6 @@
 {
   "recommendations": [
     "EditorConfig.editorconfig",
-    "dbaeumer.vscode-eslint",
-    "mrmlnc.vscode-puglint",
+    "dbaeumer.vscode-eslint"
   ]
 }

+ 61 - 0
.vscode/tasks.json

@@ -0,0 +1,61 @@
+{
+  "version": "2.0.0",
+  "presentation": {
+    "echo": false,
+    "reveal": "always",
+    "focus": false,
+    "panel": "dedicated",
+    "showReuseMessage": true
+  },
+  "tasks": [
+    {
+      "label": "Create terminals",
+      "dependsOn": [
+        "Server",
+        "UX"
+      ],
+      // Mark as the default build task so cmd/ctrl+shift+b will create them
+      "group": {
+        "kind": "build",
+        "isDefault": true
+      },
+      // Try start the task on folder open
+      "runOptions": {
+        "runOn": "folderOpen"
+      }
+    },
+    {
+      // The name that shows up in terminal tab
+      "label": "Server",
+      // The task will launch a shell
+      "type": "shell",
+      "command": "/bin/zsh",
+      "args": [],
+      // Set the shell type
+      "options": {
+        "cwd": "/workspace"
+      },
+      // Mark as a background task to avoid the spinner animation on the terminal tab
+      "isBackground": true,
+      "problemMatcher": [],
+      // Create the tasks in a terminal group
+      "presentation": {
+        "group": "shell-group"
+      }
+    },
+    {
+      "label": "UX",
+      "type": "shell",
+      "command": "/bin/zsh",
+      "args": [],
+      "options": {
+        "cwd": "/workspace/ux",
+      },
+      "isBackground": true,
+      "problemMatcher": [],
+      "presentation": {
+        "group": "shell-group"
+      }
+    }
+  ]
+}

+ 3 - 0
dev.code-workspace

@@ -7,6 +7,9 @@
 		{
 			"name": "ux",
 			"path": "ux"
+		},
+		{
+			"path": "."
 		}
 	],
 	"settings": {