Skip to content
/ bun-starter Public template

Opinionated starter boilerplate for Bun projects using VSCode and Docker for a fully local, containerized workspace

License

Notifications You must be signed in to change notification settings

lemux-one/bun-starter

Repository files navigation

bun-starter

Opinionated starter boilerplate for Bun projects using VSCode and Docker for a fully local, containerized workspace

Pre-requisites

  1. Docker engine / Docker Desktop installed and running
  2. VSCode with Dev Containers extension installed and enabled. Link to extension
  3. Git installed and properly configured (the dev container will use the credentials manager to forward git commands issued inside the container)
  4. (Optional) GitHub CLI

Getting started

  1. Clone into new project
  • Using plain git:
git clone --depth=1 https://github.com/lemux-one/bun-starter.git <new-repo-name>
cd <new-repo-name>
rm -rf .git
git init .
  • Using GitHub CLI
gh repo create <new-repo-name> --template="https://github.com/lemux-one/bun-starter.git"
gh repo create <new-repo-name> --template="lemux-one/bun-starter"
  1. Set proper Git settings to handle CRLF/LF conversion issues from Windows to Unix (this is important since the idea is to work inside a Linux-powered container):
git config core.autocrlf input
  1. (Optional, but recommended) Convert all files from CRLF to LF before opening the project inside the container. Failing to do so might (and probably will) cause some initialization scripts to fail:
find . -type f -print0 | xargs -0 dos2unix -ic0 | xargs -0 dos2unix -b
  1. Rename project (excluding README.md file if keeping original doc). Suggested methods to accomplish it:
  • Search and replace "bun-starter" with <new-repo-name> using VSCode's Search & Replace features.
  1. (Optional, but recommended) Copy .devcontainer/.env.example to .devcontainer/.env and edit it accordingly

  2. Tweak .devcontainer/devcontainer.json to fit specific use case if defaults make no sense

  3. Reopen in container [Dev Containers: Reopen in Container] VSCode command

  4. Run bun dev in a console

  5. Edit/Code at will ...

About

Opinionated starter boilerplate for Bun projects using VSCode and Docker for a fully local, containerized workspace

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published