From 68213cb9bc45592ce315977dc384829e1497a5b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radan=20Skori=C4=87?= Date: Fri, 24 May 2024 16:14:24 +0200 Subject: [PATCH] Add devcontainer setup It will make contributions easier by allowing people to get it working locally with one click or to bring it up in github codespace. --- .devcontainer/Dockerfile | 5 +++++ .devcontainer/devcontainer.json | 8 ++++++++ README.md | 8 ++++++++ 3 files changed, 21 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..bd7347a --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,5 @@ +FROM node:latest + +WORKDIR /site + +CMD ["npm", "run serve"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..9be8080 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,8 @@ +{ + "name": "Npm setup for building the turbo site", + "build": { + "dockerfile": "Dockerfile" + }, + "postCreateCommand": "npm install", + "postStartCommand": "npm run serve" +} diff --git a/README.md b/README.md index 18b999d..d9b6319 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,18 @@ This repository backs the website living at https://turbo.hotwired.dev. To work on it locally: +## Option A: Directly on your machine + 1. `npm install` 2. `npm run serve` 3. (If you need it: `npm install markdown-it` and rerun step #2). +## Option B: Using a devcontainer + +There is a devcontainer configuration that, when started, will perform all of the setup and serve the website on port 8080. + +For example, in VSCode, run "Reopen in Container" and wait for it to finish and access the site on http://localhost:8080/, + ## Copyright The logo, design, and other aesthetic parts of this website is copyright 37signals, all rights reserved. Feel free to be inspired by the structure, but do not copy the specific design, anymore than you'd copy basecamp.com or hey.com.