Add devcontainer template for Crystal.

This commit is contained in:
C.M. Hobbs 2025-07-13 01:21:24 -05:00
commit 2dc8d0aa6c
6 changed files with 50 additions and 0 deletions

17
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu
# Install packages
# libpcre3-dev is needed if you wish to use ameba
RUN apt-get update && apt-get install -y \
git \
build-essential \
curl \
libpcre3-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Crystal
RUN curl -fsSL https://crystal-lang.org/install.sh | bash
# Switch to vscode user
USER vscode
WORKDIR /workspaces

View File

@ -0,0 +1,13 @@
{
"name": "Crystal Development",
"build": {
"dockerfile": "Dockerfile"
},
"remoteUser": "vscode",
"workspaceFolder": "/workspaces/PROJECT_NAME",
"customizations": {
"vscode": {
"extensions": ["crystal-lang-tools.crystal-lang"]
}
}
}

0
README.md Normal file
View File

18
shard.yml Normal file
View File

@ -0,0 +1,18 @@
name: PROJECT_NAME
version: 0.1.0
authors:
- YOUR_NAME <YOUR_EMAIL>
crystal: 1.0.0
license: MIT
development_dependencies:
ameba:
github: crystal-ameba/ameba
version: ~> 1.6.0
targets:
PROJECT_NAME:
main: src/main.cr

1
spec/spec_helper.cr Normal file
View File

@ -0,0 +1 @@
# spec_helper.cr

1
src/main.cr Normal file
View File

@ -0,0 +1 @@
puts "Hello, PROJECT_NAME!"