diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..d46bb5c1c5 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,9 @@ +# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.203.0/containers/dotnet/.devcontainer/base.Dockerfile + +# [Choice] .NET version: 6.0, 5.0, 3.1, 6.0-bullseye, 5.0-bullseye, 3.1-bullseye, 6.0-focal, 5.0-focal, 3.1-focal +ARG VARIANT="6.0-bullseye-slim" +FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT} + +# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 +ARG NODE_VERSION="none" +RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..9d893ed07b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,29 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.203.0/containers/dotnet +{ + "name": "C# (.NET)", + "runArgs": [ + "--init" + ], + "build": { + "dockerfile": "Dockerfile", + "args": { + // Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0 + // Append -bullseye or -focal to pin to an OS version. + "VARIANT": "6.0", + // Options + "NODE_VERSION": "none" + } + }, + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-dotnettools.csharp" + ], + "settings": { + "omnisharp.enableRoslynAnalyzers": true, + "omnisharp.enableEditorConfigSupport": true, + }, + "onCreateCommand": "bash -i ${containerWorkspaceFolder}/.devcontainer/scripts/container-creation.sh", + // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode" +} \ No newline at end of file diff --git a/.devcontainer/scripts/container-creation.sh b/.devcontainer/scripts/container-creation.sh new file mode 100644 index 0000000000..f6431ff720 --- /dev/null +++ b/.devcontainer/scripts/container-creation.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -e + +## build repository, so ready to work. +dotnet build + +## Add .NET Dev Certs to environment to facilitate debugging +dotnet dev-certs https + +exit \ No newline at end of file diff --git a/.gitignore b/.gitignore index b3970293c1..b354350d1b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ obj/ .packages/ .tools/ .vs/ -.vscode/ node_modules/ BenchmarkDotNet.Artifacts/ .gradle/ diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000000..830e9d18ee --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,37 @@ +{ + "version": "2.0.0", + "inputs": [ + { + "type": "pickString", + "default": "./examples/FluentUI.Demo.Client", + "options": [ + "FluentUI.Demo.Server", + "FluentUI.Demo.Client" + ], + "id": "projectSelection", + "description": "Select project", + } + ], + "tasks": [ + { + "label": "Build library", + "type": "shell", + "command": "dotnet build", + "group": "build", + "presentation": { + "reveal": "always", + "panel": "new" + } + }, + { + "label": "Run samples", + "type": "shell", + "command": "dotnet run --project ${workspaceFolder}/examples/${input:projectSelection}/${input:projectSelection}.csproj", + "group": "build", + "presentation": { + "reveal": "always", + "panel": "new" + } + }, + ] +} \ No newline at end of file