diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c539d71..5648b6c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,13 +1,9 @@ -ARG VARIANT=12 -FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT} +# Update the VARIANT arg in docker-compose.yml to pick a Node version: 10, 12, 14 +ARG VARIANT=14 +FROM mcr.microsoft.com/vscode/devcontainers/javascript-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 modules -# RUN sudo -u node npm install -g \ No newline at end of file +# 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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1eaa918..be75c38 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,25 +1,19 @@ { - "name": "Node.js", + "name": "GCT Generator", "build": { "dockerfile": "Dockerfile", - // Update 'VARIANT' to pick a Node version: 10, 12, 14 - "args": { "VARIANT": "12" } + "args": { "VARIANT": "14" } }, - - // Set *default* container specific settings.json values on container create. "settings": { - "terminal.integrated.shell.linux": "/bin/bash" + "terminal.integrated.defaultProfile.linux": "/bin/bash" }, - - // Add the IDs of extensions you want installed when the container is created. - "extensions": ["dbaeumer.vscode-eslint"], - - // Use 'forwardPorts' to make a list of ports inside the container available locally. + "extensions": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "ms-vsliveshare.vsliveshare", + "wayou.vscode-todo-highlight", + ], "forwardPorts": [8080], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "yarn install" - - // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. - // "remoteUser": "node" + "postCreateCommand": "yarn install", + "remoteUser": "node" } diff --git a/.vscode/settings.json b/.vscode/settings.json index 8998cde..dd92ffc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,58 @@ { + "[html]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[json]": { + "editor.quickSuggestions": { + "strings": true + }, + "editor.suggest.insertMode": "replace", + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "breadcrumbs.symbolSortOrder": "type", + "editor.codeLens": true, + "editor.detectIndentation": true, + "editor.formatOnSave": true, + "editor.minimap.maxColumn": 150, + "editor.tabSize": 2, + "explorer.confirmDragAndDrop": false, + "files.associations": { + "*.erb": "html", + "*.html.erb": "html" + }, + "git.confirmSync": false, + "git.enableSmartCommit": true, + "html.format.wrapLineLength": 150, + "javascript.updateImportsOnFileMove.enabled": "always", "search.exclude": { - "**/dist": true, + "**/*.eot": true, + "**/*.png": true, + "**/*.svg": true, + "**/*.ttf": true, + "**/*.woff": true, + "**/*.woff2": true, + "**/.git": true, + "**/bower_components": true, + "**/dist/": true, "**/node_modules": true, - "yarn.lock": true - } -} + "**/tmp": true + }, + "telemetry.enableCrashReporter": false, + "todohighlight.keywords": [ + "@TODO" + ], + "typescript.preferences.importModuleSpecifier": "relative", + "typescript.referencesCodeLens.enabled": true, + "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 19f424d..e2f82cb 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "jsdom": "16.6.0", "markdown-it-attrs": "4.0.0", "pre-commit": "1.2.2", - "prettier": "2.3.1", + "prettier": "2.3.2", "vuepress": "1.8.2" }, "dependencies": { diff --git a/site/.vuepress/components/CodeList.vue b/site/.vuepress/components/CodeList.vue index 2f5e6a7..ed17f3e 100644 --- a/site/.vuepress/components/CodeList.vue +++ b/site/.vuepress/components/CodeList.vue @@ -1,7 +1,8 @@ + + diff --git a/site/.vuepress/components/Generator.vue b/site/.vuepress/components/Generator.vue index 41f7981..fda44ce 100644 --- a/site/.vuepress/components/Generator.vue +++ b/site/.vuepress/components/Generator.vue @@ -99,15 +99,6 @@