mirror of
https://github.com/cmhobbs/crystal-devcontainer-template.git
synced 2025-07-13 17:04:34 -04:00
Add devcontainer template for Crystal.
This commit is contained in:
commit
2dc8d0aa6c
17
.devcontainer/Dockerfile
Normal file
17
.devcontainer/Dockerfile
Normal 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
|
13
.devcontainer/devcontainer.json
Normal file
13
.devcontainer/devcontainer.json
Normal 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"]
|
||||
}
|
||||
}
|
||||
}
|
18
shard.yml
Normal file
18
shard.yml
Normal 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
1
spec/spec_helper.cr
Normal file
@ -0,0 +1 @@
|
||||
# spec_helper.cr
|
1
src/main.cr
Normal file
1
src/main.cr
Normal file
@ -0,0 +1 @@
|
||||
puts "Hello, PROJECT_NAME!"
|
Loading…
x
Reference in New Issue
Block a user