From 267042f74f15253ac74c0378739f2301feb35ed9 Mon Sep 17 00:00:00 2001 From: David Neu Date: Sun, 2 Nov 2025 08:25:18 +0000 Subject: [PATCH] add devcontainer config --- .devcontainer/devcontainer.json | 27 +++++++++++++++++++++++++++ interface/package.json | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..713f85d59 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,27 @@ +{ + "name": "EMS-ESP Devcontainer", + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", + "features": { + "ghcr.io/devcontainers/features/node:1": {}, + "ghcr.io/devcontainers-extra/features/pnpm:2": {}, + "ghcr.io/devcontainers/features/python:1": {}, + "ghcr.io/shyim/devcontainers-features/bun:0": {} + }, + + "forwardPorts": [ + 3000, + 3080 + ], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "cd mock-api && pnpm install && cd .. && cd interface && pnpm install", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "platformio.platformio-ide" + ] + } + } +} diff --git a/interface/package.json b/interface/package.json index ae0c1770d..8f9bc223d 100644 --- a/interface/package.json +++ b/interface/package.json @@ -19,7 +19,8 @@ "typesafe-i18n": "typesafe-i18n --no-watch", "webUI": "node progmem-generator.js", "format": "prettier -l -w '**/*.{ts,tsx,js,css,json,md}'", - "lint": "eslint . --fix" + "lint": "eslint . --fix", + "standalone-devcontainer": "concurrently -c \"auto\" \"typesafe-i18n\" \"pnpm:mock-rest\" \"vite --host\"" }, "dependencies": { "@alova/adapter-xhr": "2.2.1",