diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..c78db7d --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,13 @@ +FROM mcr.microsoft.com/devcontainers/base:jammy + +ARG PIXI_VERSION=v0.51.0 + +RUN curl -L -o /usr/local/bin/pixi -fsSL --compressed "https://github.com/prefix-dev/pixi/releases/download/${PIXI_VERSION}/pixi-$(uname -m)-unknown-linux-musl" \ + && chmod +x /usr/local/bin/pixi \ + && pixi info + +# set some user and workdir settings to work nicely with vscode +USER vscode +WORKDIR /home/vscode + +RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..8c49645 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,24 @@ +{ + "name": "my-project", + "build": { + "dockerfile": "Dockerfile", + "context": "..", + }, + "customizations": { + "vscode": { + "settings": {}, + "extensions": ["ms-python.python", "charliermarsh.ruff", "GitHub.copilot"] + }, + "codespaces": { + "openFiles": [ + "README.md", + "_InstructionSiteUpdates.md" + ] + } + }, + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": {} + }, + "mounts": ["source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume"], + "postCreateCommand": "sudo chown vscode .pixi && pixi install" +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..754e353 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,34 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "html", + "type": "shell", + "command": "pixi run html", + "group": { + "kind": "build", + "isDefault": false + } + }, + { + "label": "clean", + "type": "shell", + "command": "pixi run clean", + "group": { + "kind": "build", + "isDefault": false + } + }, + { + "label": "live", + "type": "shell", + "command": "pixi run live", + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} \ No newline at end of file