From cc3f507810d108ebaba5b2b647cf2d5e5057791f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Wed, 25 Jan 2023 12:40:39 +0100 Subject: [PATCH] chore(devcontainer): update codespaces config for Vue 3 --- .devcontainer/Dockerfile | 18 ----------------- .devcontainer/devcontainer.json | 36 +++++++++++++-------------------- .vscode/extensions.json | 11 +++++----- 3 files changed, 19 insertions(+), 46 deletions(-) delete mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 30bed680e6c..00000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.134.1/containers/typescript-node/.devcontainer/base.Dockerfile -ARG VARIANT="18" -FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT} - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - -# [Optional] Uncomment if you want to install an additional version of node using nvm -# ARG EXTRA_NODE_VERSION=10 -# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" - -# [Optional] Uncomment if you want to install more global node packages -# RUN sudo -u node npm install -g - -# [Optional] Persist bash history -RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.zsh_history" \ - && echo $SNIPPET >> "/root/.zshrc" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index af243a87ae1..d9634e50b0c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,27 +1,19 @@ -// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.1/containers/typescript-node { - "name": "Node.js & TypeScript", - "build": { - "dockerfile": "Dockerfile", - // Update 'VARIANT' to pick a Node version: 10, 12, 14... - "args": { - "VARIANT": "18" - } + "name": "jellyfin-vue Codespace (with support for Tauri development)", + "image": "mcr.microsoft.com/devcontainers/typescript-node:0-18", + "features": { + "ghcr.io/devcontainers/features/rust:1": {} }, - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "octref.vetur", - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", - "lokalise.i18n-ally", - "ryanluker.vscode-coverage-gutters" - ], - // Use 'forwardPorts' to make a list of ports inside the container available locally. + "containerEnv": { "SHELL": "/bin/bash" }, "forwardPorts": [3000], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "npm install", - // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. - // "remoteUser": "node" + "portsAttributes": { + "3000": { + "label": "Vite server", + "onAutoForward": "notify" + } + }, + "postCreateCommand": "npm ci", + "postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension", + "hostRequirements": { "cpus": 4, "memory": "6gb" }, "mounts": ["source=jellyfin-vue-history,target=/commandhistory,type=volume"] } diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 2359bc392ca..588c728d124 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,10 +1,10 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. - // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp - - // List of extensions which should be recommended for users of this workspace. "recommendations": [ "antfu.vite", + "antfu.browse-lite", + "antfu.iconify", + "aaron-bond.better-comments", + "eamodio.gitlens", "Vue.volar", "Vue.vscode-typescript-vue-plugin", "dbaeumer.vscode-eslint", @@ -12,6 +12,5 @@ "lokalise.i18n-ally", "ryanluker.vscode-coverage-gutters" ], - // List of extensions recommended by VS Code that should not be recommended for users of this workspace. - "unwantedRecommendations": [] + "unwantedRecommendations": ["octref.vetur"] }