chore(devcontainer): update codespaces config for Vue 3

This commit is contained in:
Fernando Fernández 2023-01-25 12:40:39 +01:00
parent 53b4b97423
commit cedc32114c
3 changed files with 19 additions and 47 deletions

View File

@ -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 <your-package-list-here>
# [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 <your-package-list -here>
# [Optional] Persist bash history
RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.zsh_history" \
&& echo $SNIPPET >> "/root/.zshrc"

View File

@ -1,27 +1,18 @@
// 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": {}
},
"containerEnv": { "SHELL": "/bin/bash" },
"forwardPorts": [3000],
"portsAttributes": {
"3000": {
"label": "Vite server",
"onAutoForward": "notify"
}
},
// 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.
"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"
"mounts": ["source=jellyfin-vue-history,target=/commandhistory,type=volume"]
"postCreateCommand": "npm ci",
"postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension",
"hostRequirements": { "cpus": 4, "memory": "8gb" }
}

View File

@ -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"]
}