diff --git a/src/color/.devcontainer/devcontainer.json b/src/color/.devcontainer/devcontainer.json deleted file mode 100644 index 0c20573..0000000 --- a/src/color/.devcontainer/devcontainer.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "Favorite color", - "image": "mcr.microsoft.com/devcontainers/base:${templateOption:imageVariant}", - - // 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features. - // "features": {}, - - // 👇 Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - "postCreateCommand": "echo '${templateOption:favorite}' > /tmp/color.txt" - - // 👇 Configure tool-specific properties. - // "customizations": {}, - - // 👇 Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/src/color/README.md b/src/color/README.md deleted file mode 100644 index a329dff..0000000 --- a/src/color/README.md +++ /dev/null @@ -1,17 +0,0 @@ - -# My Favorite Color (color) - -A Template to remind you of your favorite color - -## Options - -| Options Id | Description | Type | Default Value | -|-----|-----|-----|-----| -| imageVariant | Debian version (use bullseye on local arm64/Apple Silicon): | string | bullseye | -| favorite | Choose your favorite color. | string | red | - - - ---- - -_Note: This file was auto-generated from the [devcontainer-template.json](https://github.com/devcontainers/template-starter/blob/main/src/color/devcontainer-template.json). Add additional notes to a `NOTES.md`._ diff --git a/src/color/devcontainer-template.json b/src/color/devcontainer-template.json deleted file mode 100644 index a64d31c..0000000 --- a/src/color/devcontainer-template.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "id": "color", - "version": "1.0.0", - "name": "My Favorite Color", - "description": "A Template to remind you of your favorite color", - "documentationURL": "https://github.com/devcontainers/template-starter/tree/main/src/color", - "licenseURL": "https://github.com/devcontainers/template-starter/blob/main/LICENSE", - "options": { - "imageVariant": { - "type": "string", - "description": "Debian version (use bullseye on local arm64/Apple Silicon):", - "proposals": [ - "bullseye", - "buster" - ], - "default": "bullseye" - }, - "favorite": { - "type": "string", - "description": "Choose your favorite color.", - "proposals": [ - "red", - "gold", - "green" - ], - "default": "red" - } - }, - "platforms": [ - "Any" - ] -} diff --git a/src/hello/.devcontainer/Dockerfile b/src/hello/.devcontainer/Dockerfile deleted file mode 100644 index 9c45c4c..0000000 --- a/src/hello/.devcontainer/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM mcr.microsoft.com/devcontainers/base:${templateOption:imageVariant} - -RUN mkdir -p /usr/local/etc \ - && echo "${templateOption:greeting}" > /usr/local/etc/greeting.txt \ No newline at end of file diff --git a/src/hello/.devcontainer/devcontainer.json b/src/hello/.devcontainer/devcontainer.json deleted file mode 100644 index fc33f83..0000000 --- a/src/hello/.devcontainer/devcontainer.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "Hello, World", - "build": { - "dockerfile": "Dockerfile" - }, - - // 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features. - // "features": {}, - - // 👇 Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // 👇 Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "cat /usr/local/etc/greeting.txt" - - // 👇 Configure tool-specific properties. - // "customizations": {}, - - // 👇 Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/src/hello/README.md b/src/hello/README.md deleted file mode 100644 index 2cdac8f..0000000 --- a/src/hello/README.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Hello, World (hello) - -A hello world Template - -## Options - -| Options Id | Description | Type | Default Value | -|-----|-----|-----|-----| -| imageVariant | Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): | string | jammy | -| greeting | Select a pre-made greeting, or enter your own | string | hey | - - - ---- - -_Note: This file was auto-generated from the [devcontainer-template.json](https://github.com/devcontainers/template-starter/blob/main/src/hello/devcontainer-template.json). Add additional notes to a `NOTES.md`._ diff --git a/src/hello/devcontainer-template.json b/src/hello/devcontainer-template.json deleted file mode 100644 index 342c75e..0000000 --- a/src/hello/devcontainer-template.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "hello", - "version": "1.0.0", - "name": "Hello, World", - "description": "A hello world Template", - "documentationURL": "https://github.com/devcontainers/template-starter/tree/main/src/hello", - "licenseURL": "https://github.com/devcontainers/template-starter/blob/main/LICENSE", - "options": { - "imageVariant": { - "type": "string", - "description": "Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon):", - "proposals": [ - "jammy", - "focal", - "bionic" - ], - "default": "jammy" - }, - "greeting": { - "type": "string", - "description": "Select a pre-made greeting, or enter your own", - "proposals": [ - "hey", - "hello", - "hi", - "howdy" - ], - "default": "hey" - } - }, - "platforms": [ - "Any" - ] -} diff --git a/src/wails/.devcontainer/devcontainer.json b/src/wails/.devcontainer/devcontainer.json new file mode 100644 index 0000000..f8db9f4 --- /dev/null +++ b/src/wails/.devcontainer/devcontainer.json @@ -0,0 +1,44 @@ +{ + "name": "Wails Development Environment", + //"image": "mcr.microsoft.com/devcontainers/base:${templateOption:imageVariant}", + "build": { + "dockerfile": "Dockerfile" + }, + "features": { + "ghcr.io/devcontainers/features/go:1": { + "version": "1.22" + }, + "ghcr.io/devcontainers/features/node:1": { + "version": "20" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "golang.go", + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "ms-vscode.vscode-typescript-next" + ], + "settings": { + "go.toolsManagement.checkForUpdates": "local", + "go.useLanguageServer": true + } + } + }, + "forwardPorts": [3000], + "remoteUser": "vscode", + // 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features. + // "features": {}, + + // 👇 Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + "postCreateCommand": "echo '${templateOption:favorite}' > /tmp/color.txt" + // "postCreateCommand": "go install github.com/wailsapp/wails/v2/cmd/wails@latest && wails doctor", + // 👇 Configure tool-specific properties. + // "customizations": {}, + + // 👇 Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" + } \ No newline at end of file diff --git a/src/wails/README.md b/src/wails/README.md new file mode 100644 index 0000000..fff4912 --- /dev/null +++ b/src/wails/README.md @@ -0,0 +1,44 @@ +# Wails Development Container (wails-dev) + +A development container template for building Wails applications with Go and Node.js. + +## Options + +| Options Id | Description | Type | Default Value | +|-----|-----|-----|-----| +| imageVariant | Ubuntu version (use jammy on arm64/Apple Silicon): | string | jammy | +| nodeVersion | Default Node.js version to be installed via NVM: | string | 20 | +| goVersion | Go version to be installed: | string | 1.22 | +| installWailsVersion | Wails CLI version to install: | string | latest | + +## Included Features + +- Go (via devcontainer CLI feature) +- NVM for Node.js version management +- Wails CLI and dependencies +- Essential build tools +- VSCode extensions for Go and web development +- X11 forwarding support for GUI applications + +## System Requirements + +- libwebkit2gtk-4.0-dev +- libgtk-3-dev +- Build essentials +- NSIS (for Windows installers) +- UPX (optional, for compression) + +## Port Forwarding + +| Port | Description | +|-----|-----| +| 3000 | Default development server | +| 34115 | Wails development server | + +## Container User + +- `vscode` (non-root) with sudo access + +--- + +_Note: This file was auto-generated from the [devcontainer-template.json](https://github.com/yourusername/wails-devcontainer/blob/main/devcontainer-template.json). Additional documentation can be found in [NOTES.md](NOTES.md)._ \ No newline at end of file diff --git a/src/wails/devcontainer-template.json b/src/wails/devcontainer-template.json new file mode 100644 index 0000000..f0b2067 --- /dev/null +++ b/src/wails/devcontainer-template.json @@ -0,0 +1,33 @@ +{ + "id": "wails-development", + "version": "1.0.0", + "name": "Wails Development Environment", + "description": "A Template for building Wails applications with Go and Node.js", + "documentationURL": "https://github.com/tweekhub/devcontainers/tree/main/src/wails", + "publisher": "YourName", + "licenseURL": "https://github.com/tweekhub/devcontainers/blob/main/LICENSE", + "options": { + "imageVariant": { + "type": "string", + "description": "Ubuntu version:", + "proposals": [ + "jammy", + "focal" + ], + "default": "jammy" + }, + "nodeVersion": { + "type": "string", + "description": "Node.js version:", + "proposals": [ + "20", + "18", + "16" + ], + "default": "20" + } + }, + "platforms": [ + "Any" + ] + } \ No newline at end of file diff --git a/test/color/test.sh b/test/color/test.sh deleted file mode 100644 index b75ba5b..0000000 --- a/test/color/test.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -cd $(dirname "$0") -source test-utils.sh - -# Template specific tests -check "distro" lsb_release -c -check "color" [ $(cat /tmp/color.txt | grep red) ] - -# Report result -reportResults diff --git a/test/hello/test.sh b/test/hello/test.sh deleted file mode 100644 index 0428c34..0000000 --- a/test/hello/test.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -cd $(dirname "$0") -source test-utils.sh - -# Template specific tests -check "distro" lsb_release -c -check "greeting" [ $(cat /usr/local/etc/greeting.txt | grep hey) ] - -# Report result -reportResults diff --git a/test/wails/test.sh b/test/wails/test.sh new file mode 100644 index 0000000..a388d22 --- /dev/null +++ b/test/wails/test.sh @@ -0,0 +1,17 @@ +#!/bin/bash +cd $(dirname "$0") +source test-utils.sh + +# Template specific tests +check "distro" lsb_release -c +check "Verify correct Ubuntu variant" lsb_release -c | grep $(jq -r '.options.imageVariant.default' .devcontainer/devcontainer-template.json) +check "Verify Go version" go version | grep "go1.22" +check "Verify Node.js version" node --version | grep "v20." +check "Verify VSCode Go extension" [ -d "/home/vscode/.vscode-server/extensions/golang.go-*" ] +check "Verify ESLint extension" [ -d "/home/vscode/.vscode-server/extensions/dbaeumer.vscode-eslint-*" ] +check "Verify Wails installation" command -v wails +check "Verify forwarded port" grep 3000 .devcontainer/devcontainer.json +check "Verify remote user" [ $(whoami) = "vscode" ] + +# Report result +reportResults