From 79fab84fae099d7c135fb76748c0836b1935d8c0 Mon Sep 17 00:00:00 2001 From: Matteias Collet Date: Sun, 16 Jan 2022 18:17:07 +0000 Subject: [PATCH] minor cleanup --- .devcontainer/Dockerfile | 24 +++- .devcontainer/devcontainer.json | 4 +- .devcontainer/post-install.sh | 8 ++ .nvmrc | 1 + .vscode/settings.json | 5 +- package.json | 4 +- site/.vuepress/components/CodeInfo.vue | 1 - site/.vuepress/components/CodeList.vue | 2 - site/.vuepress/components/DownloadButton.vue | 14 +-- site/.vuepress/components/FeedbackModal.vue | 109 ------------------- site/.vuepress/components/FormatSelect.vue | 4 - site/.vuepress/components/StageLoader.vue | 5 - site/.vuepress/components/VersionSelect.vue | 3 - site/.vuepress/enhanceApp.js | 14 +-- 14 files changed, 42 insertions(+), 156 deletions(-) create mode 100644 .devcontainer/post-install.sh create mode 100644 .nvmrc delete mode 100644 site/.vuepress/components/FeedbackModal.vue diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 5648b6c..8a3b6e5 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,9 +1,29 @@ # Update the VARIANT arg in docker-compose.yml to pick a Node version: 10, 12, 14 -ARG VARIANT=14 +ARG VARIANT=16 FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} +# See https://github.com/microsoft/vscode-dev-containers/tree/master/containers/docker-from-docker for more documentation +# On how to use docker from within docker + +# Install Docker CE CLI +RUN apt-get update \ + && apt-get install -y apt-transport-https ca-certificates curl gnupg2 lsb-release \ + && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \ + && echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list \ + && apt-get update \ + && apt-get install -y docker-ce-cli + +# Install Docker Compose +RUN LATEST_COMPOSE_VERSION=$(curl -sSL "https://api.github.com/repos/docker/compose/releases/latest" | grep -o -P '(?<="tag_name": ").+(?=")') \ + && curl -sSL "https://github.com/docker/compose/releases/download/${LATEST_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \ + && chmod +x /usr/local/bin/docker-compose # Update args in docker-compose.yaml to set the UID/GID of the "node" user. ARG USER_UID=1000 ARG USER_GID=$USER_UID -RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then groupmod --gid $USER_GID node && usermod --uid $USER_UID --gid $USER_GID node; fi \ No newline at end of file +RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then groupmod --gid $USER_GID node && usermod --uid $USER_UID --gid $USER_GID node; fi + +# Add the node user to the docker group to access +# the daemon without sudo +RUN groupadd docker +RUN usermod -a -G docker node \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 94c0487..39ababb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,6 @@ "name": "GCT Generator", "build": { "dockerfile": "Dockerfile", - "args": { "VARIANT": "14" } }, "settings": { "terminal.integrated.defaultProfile.linux": "bash" @@ -12,8 +11,9 @@ "esbenp.prettier-vscode", "ms-vsliveshare.vsliveshare", "wayou.vscode-todo-highlight", + "octref.vetur" ], "forwardPorts": [8080, 3000], - "postCreateCommand": "npm install", + "postCreateCommand": "bash -i .devcontainer/post-create.sh", "remoteUser": "node" } diff --git a/.devcontainer/post-install.sh b/.devcontainer/post-install.sh new file mode 100644 index 0000000..384c01d --- /dev/null +++ b/.devcontainer/post-install.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e +nvm install +nvm use +nvm alias default $(node --version) +nvm install-latest-npm +npm i \ No newline at end of file diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..5b0ad74 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +16.13.0 \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index dd92ffc..6175abb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,6 +15,9 @@ "editor.suggest.insertMode": "replace", "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "[vue-html]": { + "editor.defaultFormatter": "octref.vetur" + }, "breadcrumbs.symbolSortOrder": "type", "editor.codeLens": true, "editor.detectIndentation": true, @@ -43,7 +46,6 @@ "**/node_modules": true, "**/tmp": true }, - "telemetry.enableCrashReporter": false, "todohighlight.keywords": [ "@TODO" ], @@ -52,7 +54,6 @@ "typescript.referencesCodeLens.showOnAllFunctions": true, "typescript.reportStyleChecksAsWarnings": true, "typescript.updateImportsOnFileMove.enabled": "always", - "window.zoomLevel": 0, "workbench.editor.enablePreview": false, "workbench.editor.enablePreviewFromQuickOpen": false } \ No newline at end of file diff --git a/package.json b/package.json index 483d6b0..41c06f3 100644 --- a/package.json +++ b/package.json @@ -32,5 +32,7 @@ "dependencies": { "vuedraggable": "^2.24.3" }, - "pre-commit": ["precommit"] + "pre-commit": [ + "precommit" + ] } diff --git a/site/.vuepress/components/CodeInfo.vue b/site/.vuepress/components/CodeInfo.vue index 0436ee2..1c53ef4 100644 --- a/site/.vuepress/components/CodeInfo.vue +++ b/site/.vuepress/components/CodeInfo.vue @@ -15,7 +15,6 @@ - - diff --git a/site/.vuepress/components/FormatSelect.vue b/site/.vuepress/components/FormatSelect.vue index 0b82a34..0b6a8bf 100644 --- a/site/.vuepress/components/FormatSelect.vue +++ b/site/.vuepress/components/FormatSelect.vue @@ -3,10 +3,6 @@