Skip to content

Commit 8f8966d

Browse files
committed
build: add a vscode devcontainer config
1 parent b46d3a1 commit 8f8966d

4 files changed

Lines changed: 42 additions & 21 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "Node.js & TypeScript",
3+
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm",
4+
"features": {
5+
"ghcr.io/devcontainers/features/node:1": {},
6+
"ghcr.io/devcontainers-extra/features/corepack:1": {}
7+
},
8+
9+
"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh",
10+
11+
"remoteUser": "root"
12+
}

.devcontainer/postCreateCommand.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
corepack enable yarn
2+
corepack prepare yarn@4.7.0 --activate

README.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
# Poketest 2022
22

3-
## Project setup
4-
```
5-
yarn install
6-
```
3+
## Requirements
4+
5+
* VSCode Dev Container (Docker) -- ***Suggested***
6+
77
or
8-
```
9-
npm install
10-
```
8+
* node 18+ with yarn 4.7.0
9+
10+
## Project setup
11+
### With VSCode Dev Container -- ***Suggested***
1112

12-
### Start dev server
13+
* `cmd` + `shift` + `p`. Search for : `Dev Containers: Reopen in Container`
14+
* This should open the workspace in a new window / container running proper requirements.
15+
* `yarn install` should have be ran.
16+
17+
### With Manual approach
18+
* Make sure you have the proper node and yarn requirement.
19+
* run `yarn install`
20+
21+
## Start dev server
1322
```
1423
yarn dev
1524
```
16-
or
17-
```
18-
npm run dev
19-
```
2025

21-
### Compiles and minifies for production
26+
## Compiles and minifies for production
2227
```
2328
yarn build
2429
```
25-
or
26-
```
27-
npm run build
28-
```
2930

30-
### Context
31+
## Context
3132
A client wants us to make an app that displays pokemons and allows a user to add one to its team but unfortunately some things are not working properly or are really, really, bad!
3233

3334
That's where you come in! I choose you (!!!) to fix these issues and implement what you think is best for the client need.
@@ -45,5 +46,8 @@ Here is a ***sample*** list of things that needs doing but ultimately it's your
4546

4647
## Recommended IDE Setup
4748

48-
- Node 18+
49-
- [VS Code](https://code.visualstudio.com/) + [Vue](https://marketplace.visualstudio.com/items?itemName=Vue.volar) + [Tailwind](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
49+
- [VS Code](https://code.visualstudio.com/)
50+
- [Vue](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
51+
- [Tailwind](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
52+
53+
These should be suggested directly when using VS Code.

vite.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ export default defineConfig({
77
plugins: [
88
vue(),
99
tailwindcss(),
10-
]
10+
],
11+
server: {
12+
host: '0.0.0.0'
13+
}
1114
})

0 commit comments

Comments
 (0)