Skip to content

Commit da983a9

Browse files
chore: add GitHub codespace (#392)
1 parent e4a9a84 commit da983a9

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

Diff for: .devcontainer/devcontainer.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// For format details, see https://aka.ms/devcontainer.json.
2+
{
3+
"name": "angular-testing-library",
4+
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-18-bullseye",
5+
6+
// Features to add to the dev container. More info: https://containers.dev/features.
7+
"features": {
8+
"ghcr.io/devcontainers/features/github-cli:1": {},
9+
"ghcr.io/devcontainers/features/sshd:1": {}
10+
},
11+
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
// "forwardPorts": [],
14+
15+
// Use 'postCreateCommand' to run commands after the container is created.
16+
"postCreateCommand": "npm i",
17+
"onCreateCommand": "sudo cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt",
18+
"waitFor": "postCreateCommand",
19+
20+
// Configure tool-specific properties.
21+
"customizations": {
22+
// Configure properties specific to VS Code.
23+
"vscode": {
24+
"settings": {
25+
"[typescript]": {
26+
"editor.defaultFormatter": "esbenp.prettier-vscode",
27+
"editor.formatOnSave": true
28+
},
29+
"[md]": {
30+
"editor.defaultFormatter": "esbenp.prettier-vscode",
31+
"editor.formatOnSave": true
32+
},
33+
"[json]": {
34+
"editor.defaultFormatter": "esbenp.prettier-vscode",
35+
"editor.formatOnSave": true
36+
}
37+
},
38+
// Add the IDs of extensions you want installed when the container is created.
39+
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
40+
}
41+
}
42+
}

Diff for: .devcontainer/welcome-message.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
👋 Welcome to "Angular Testing Library" in GitHub Codespaces!
2+
3+
🛠️ Your environment is fully setup with all the required software.
4+
5+
🔍 To explore VS Code to its fullest, search using the Command Palette (Cmd/Ctrl + Shift + P or F1).
6+
7+
📝 Edit away, run your app as usual, and we'll automatically make it available for you to access.

Diff for: README.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,14 @@ practices.</p>
4747
</a>
4848
</div>
4949

50+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=137053739)
51+
5052
## Table of Contents
5153

5254
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
5355
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5456

57+
- [Table of Contents](#table-of-contents)
5558
- [The problem](#the-problem)
5659
- [This solution](#this-solution)
5760
- [Example](#example)
@@ -60,10 +63,12 @@ practices.</p>
6063
- [Contributors](#contributors)
6164
- [Docs](#docs)
6265
- [FAQ](#faq)
66+
- [I am using Reactive Forms and the `jest-dom` matcher `toHaveFormValues` always returns an empty object or there are missing fields. Why?](#i-am-using-reactive-forms-and-the-jest-dom-matcher-tohaveformvalues-always-returns-an-empty-object-or-there-are-missing-fields-why)
6367
- [Issues](#issues)
6468
- [🐛 Bugs](#-bugs)
6569
- [💡 Feature Requests](#-feature-requests)
6670
- [❓ Questions](#-questions)
71+
- [Getting started with GitHub Codespaces](#getting-started-with-github-codespaces)
6772
- [LICENSE](#license)
6873

6974
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -250,7 +255,7 @@ Contributions of any kind welcome!
250255

251256
## FAQ
252257

253-
##### I am using Reactive Forms and the `jest-dom` matcher `toHaveFormValues` always returns an empty object or there are missing fields. Why?
258+
### I am using Reactive Forms and the `jest-dom` matcher `toHaveFormValues` always returns an empty object or there are missing fields. Why?
254259

255260
Only form elements with a `name` attribute will have their values passed to `toHaveFormsValues`.
256261

@@ -280,6 +285,16 @@ instead of filing an issue on GitHub.
280285
- [Discord][discord]
281286
- [Stack Overflow][stackoverflow]
282287

288+
## Getting started with GitHub Codespaces
289+
290+
To get started, create a codespace for this repository by clicking this 👇
291+
292+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=137053739)
293+
294+
A codespace will open in a web-based version of Visual Studio Code. The [dev container](.devcontainer/devcontainer.json) is fully configured with software needed for this project.
295+
296+
**Note**: Dev containers is an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other tools](https://containers.dev/supporting).
297+
283298
## LICENSE
284299

285300
MIT

0 commit comments

Comments
 (0)