defold / defold.github.io

www.defold.com
Other
11 stars 13 forks source link

Add config for devcontainer #79

Closed mikatuo closed 5 months ago

mikatuo commented 10 months ago

Having a devcontainer config should simplify contributions as it will make it easy to setup a dev environment for defold.github.io. I believe the only requirement to use devcontainer is to install Docker. It could be used with Github Codespaces, in this case one will only need a browser. For quick fixes that would be very convenient. PR https://github.com/defold/defold.github.io/pull/80 was made using the devcontainer and it worked great.

Developing inside a Container

https://code.visualstudio.com/docs/devcontainers/containers

Demo

https://github.com/defold/defold.github.io/assets/7230306/965fcd06-72c4-42a9-8218-cb20f883f255

AGulev commented 5 months ago

@britzl pls take a look

mikatuo commented 5 months ago

A few tips (if using Codespaces)

mikatuo commented 5 months ago

https://code.visualstudio.com/docs/devcontainers/containers has a lot of useful info, in example, about pre-building the image for faster startup times, or about adding additional VS Code extensions via the devcontainer.json, etc...

{
  "image": "mcr.microsoft.com/devcontainers/typescript-node",
  "forwardPorts": [3000],
  "customizations": {
    // Configure properties specific to VS Code.
    "vscode": {
      // Add the IDs of extensions you want installed when the container is created.
      "extensions": ["streetsidesoftware.code-spell-checker"]
    }
  }
}
britzl commented 5 months ago

Thanks!