Skip to content

Commit

Permalink
Adds support for VS Code Remote Development (home-assistant#9726)
Browse files Browse the repository at this point in the history
* Adds support for VS Code Remote Development

* Adds support for VS Code Remote Development
  • Loading branch information
frenck authored and pvizeli committed Jun 29, 2019
1 parent 1bfde07 commit 3d3e801
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ruby:2.6

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# Use Bash as the default shell
ENV SHELL=/bin/bash

# Locale env vars
ENV \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8

# Install git, process tools
RUN apt update \
&& apt-get install -y --no-install-recommends \
ack \
git \
locales \
procps \
&& echo "en_US UTF-8" > /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& echo 'export PS1="\\w\$ "' > /root/.bashrc \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

# Install the specific version of bundler we need
RUN gem install bundler -v 2.0.1

# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
30 changes: 30 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "home-assistant.io",
"dockerFile": "Dockerfile",
"appPort": [
4000
],
"postCreateCommand": "bundle install",
"extensions": [
"davidanson.vscode-markdownlint",
"eamodio.gitlens",
"editorconfig.editorconfig",
"github.vscode-pull-request-github",
"mrmlnc.vscode-scss",
"ms-vsliveshare.vsliveshare",
"rebornix.Ruby",
"streetsidesoftware.code-spell-checker",
"yzhang.markdown-all-in-one"
],
"settings": {
"editor.rulers": [80, 100, 120],
"editor.renderWhitespace": "boundary",
"errorLens.gutterIconsEnabled": true,
"errorLens.addAnnotationTextPrefixes": false,
"errorLens.enabledDiagnosticLevels": [
"error",
"warning"
],
"terminal.integrated.shell.linux": "/bin/bash"
}
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ source/.jekyll-metadata
/.vs/config/applicationhost.config
/.vs/slnx.sqlite-journal
/.vs/VSWorkspaceState.json
.vscode
.vscode/*
!.vscode/cSpell.json
!.vscode/extensions.json
!.vscode/tasks.json
*.suo
83 changes: 83 additions & 0 deletions .vscode/cSpell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// cSpell Settings
// Contains additional words for our project
{
"version": "0.1",
"language": "en",
"words": [
"arest",
"automations",
"bloomsky",
"bluesound",
"BTLE",
"Denon",
"endconfiguration",
"endraw",
"fitbit",
"Flexit",
"geizhals",
"Harman",
"hass",
"hass.io",
"hassos",
"hcitool",
"heos",
"hikvision",
"Homematic",
"IBAN",
"icloud",
"kardon",
"macos",
"Modbus",
"Mosquitto",
"nginx",
"ohmconnect",
"Onkyo",
"paulus",
"templating",
"waqi",
"Webhook"
],
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"
"flagWords": [
"hte",
"asssistant"
],
"enabledLanguageIds": [
"asciidoc",
"c",
"cpp",
"csharp",
"css",
"dockerfile",
"gemfile",
"git-commit",
"go",
"handlebars",
"html",
"jade",
"java",
"javascript",
"javascriptreact",
"json",
"jsonc",
"latex",
"less",
"liquid",
"markdown",
"php",
"plaintext",
"pug",
"python",
"restructuredtext",
"rust",
"scala",
"scss",
"text",
"typescript",
"typescriptreact",
"yaml",
"yml"
]
}
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"davidanson.vscode-markdownlint",
"editorconfig.editorconfig",
"streetsidesoftware.code-spell-checker",
"yzhang.markdown-all-in-one"
]
}
23 changes: 23 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Generate",
"type": "shell",
"command": "bundle exec rake generate",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Preview",
"type": "shell",
"command": "bundle exec rake preview",
"group": {
"kind": "test",
"isDefault": true,
}
}
]
}

0 comments on commit 3d3e801

Please sign in to comment.