Skip to content

Commit 1337e2f

Browse files
authored
Merge pull request #17 from gitgitWi/nextjs/v1
개발환경용 Dockerfile, Next.js, TS, lint-staged 설정 추가
2 parents 8b7a30b + bb500d9 commit 1337e2f

File tree

8 files changed

+718
-860
lines changed

8 files changed

+718
-860
lines changed

.devcontainer/devcontainer.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.205.1/containers/docker-existing-dockerfile
3+
{
4+
"name": "Existing Dockerfile",
5+
"context": "..",
6+
"dockerFile": "../Dockerfile.dev",
7+
"settings": {
8+
"editor.formatOnSave": true,
9+
"editor.formatOnSaveMode": "file",
10+
"files.autoSave": "onFocusChange",
11+
"editor.defaultFormatter": "esbenp.prettier-vscode"
12+
},
13+
"extensions": [
14+
"shd101wyy.markdown-preview-enhanced",
15+
"yzhang.markdown-all-in-one",
16+
"esbenp.prettier-vscode",
17+
"foxundermoon.shell-format",
18+
"visualstudioexptteam.vscodeintellicode",
19+
"wakatime.vscode-wakatime",
20+
"mutantdino.resourcemonitor",
21+
"mhutchie.git-graph",
22+
"editorconfig.editorconfig",
23+
"eamodio.gitlens",
24+
"ldez.ignore-files",
25+
"streetsidesoftware.code-spell-checker",
26+
"adpyke.codesnap",
27+
"oderwat.indent-rainbow",
28+
"christian-kohler.path-intellisense",
29+
"fabiospampinato.vscode-highlight",
30+
"wix.vscode-import-cost",
31+
"helixquar.randomeverything",
32+
"syler.sass-indented",
33+
"codezombiech.gitignore",
34+
"christian-kohler.npm-intellisense",
35+
"ms-vscode.vscode-typescript-next",
36+
"devonray.snippet",
37+
"dbaeumer.vscode-eslint",
38+
"nepaul.editorconfiggenerator",
39+
"vscode-icons-team.vscode-icons",
40+
"kisstkondoros.vscode-codemetrics",
41+
"formulahendry.auto-close-tag",
42+
"formulahendry.auto-rename-tag",
43+
"mikestead.dotenv",
44+
"naumovs.color-highlight",
45+
"gencer.html-slim-scss-css-class-completion",
46+
"mrmlnc.vscode-scss"
47+
]
48+
}

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx pretty-quick --staged
5+
npx lint-staged

.lintstagedrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
"**/src/**/*.{js,ts,jsx,tsx,vue}": ["eslint --fix"],
3+
};

Dockerfile.dev

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
FROM debian:stable-slim
2+
3+
RUN apt update
4+
RUN apt-get update
5+
6+
RUN apt-get install -y \
7+
locales zsh curl wget unzip sudo git \
8+
dirmngr gpg gawk
9+
RUN apt autoremove -y
10+
11+
RUN rm -rf /var/lib/apt/lists/* && localedef -i ko_KR -c -f UTF-8 -A /usr/share/locale/locale.alias ko_KR.UTF-8
12+
ENV LANG en_US.UTF-8
13+
ENV TZ="Asia/Seoul"
14+
15+
RUN git config --global init.defaultBranch main
16+
RUN git config --global user.name "gitgitWi"
17+
RUN git config --global user.email "wiii@kakao.com"
18+
19+
RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
20+
RUN git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
21+
RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
22+
23+
RUN rm $HOME/.zshrc
24+
RUN wget -P $HOME/ "https://gist.githubusercontent.com/gitgitWi/93f3583109ac09076fbef6b64c76536f/raw/a88cf8320d863d119353625f0db13719cb4d2fa4/.zshrc"
25+
RUN chsh -s /usr/bin/zsh
26+
27+
# After this container started, install Node.js with asdf
28+
# git clone https://github.com/asdf-vm/asdf.git $HOME/.asdf
29+
# . $HOME/.asdf/asdf.sh
30+
# curl -s https://gist.githubusercontent.com/gitgitWi/7d350c08a2a5283c873fc6ac8df239d5/raw/22977348d561cffafcb1ceeb488513312fd40d87/nodejs.sh | zsh

next-env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/// <reference types="next" />
2-
/// <reference types="next/types/global" />
32
/// <reference types="next/image-types/global" />
43

54
// NOTE: This file should not be edited

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"dependencies": {
1414
"@mdx-js/loader": "^1.6.22",
1515
"@next/mdx": "^11.1.0",
16-
"next": "11.1.1",
17-
"react": "17.0.2",
18-
"react-dom": "17.0.2",
16+
"next": "12",
17+
"react": "^17.0.2",
18+
"react-dom": "^17.0.2",
1919
"sass": "^1.38.0"
2020
},
2121
"devDependencies": {

tsconfig.json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,14 @@
1111
// "emitDecoratorMetadata": true,
1212
"skipLibCheck": true,
1313
"forceConsistentCasingInFileNames": true,
14-
"lib": [
15-
"dom",
16-
"dom.iterable",
17-
"esnext"
18-
],
14+
"lib": ["dom", "dom.iterable", "esnext"],
1915
"noEmit": true,
2016
"moduleResolution": "node",
2117
"resolveJsonModule": true,
2218
"isolatedModules": true,
23-
"jsx": "preserve"
19+
"jsx": "preserve",
20+
"incremental": true
2421
},
25-
"include": [
26-
"next-env.d.ts",
27-
"**/*.ts",
28-
"**/*.tsx"
29-
],
30-
"exclude": [
31-
"node_modules"
32-
]
22+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
23+
"exclude": ["node_modules"]
3324
}

0 commit comments

Comments
 (0)