Skip to content

Commit

Permalink
Merge pull request #112 from 42Where/feature/restructure
Browse files Browse the repository at this point in the history
[#104] 재구조화 (Feature/restructure)
  • Loading branch information
daejlee authored Sep 24, 2024
2 parents 073bd2c + 419a6e4 commit ba8d6ae
Show file tree
Hide file tree
Showing 76 changed files with 1,304 additions and 1,127 deletions.
16 changes: 15 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
{
"extends": ["next/core-web-vitals"]
"extends": [
"prettier",
"airbnb",
"airbnb-typescript",
"plugin:storybook/recommended"
],
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": "error"
},
"parserOptions": {
"project": "./tsconfig.json"
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# testing
/coverage
/src/pages/font-test

# next.js
/.next/
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"plugins": ["prettier-plugin-tailwindcss"],
"tailwindPreserveWhitespace": true
}
23 changes: 12 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
FROM node:alpine AS deps
RUN apk add --no-cache libc6-compat python3 build-base
RUN apk add libc6-compat python3 build-base
WORKDIR /app
# package.json과 package-lock.json을 먼저 복사해서 캐시 활용
COPY package.json package-lock.json ./
RUN npm install

FROM node:alpine AS builder
WORKDIR /app
# 의존성 설치 후 나머지 파일 복사
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN npm run build
# html 폴더를 생성해서 /app/out 디렉토리에 있는 모든 .html 파일을 html 폴더에 이동
RUN mkdir /app/out/html
RUN mv /app/out/*.html /app/out/html
RUN mkdir /app/assets
# /app/out 디렉토리에서 html 폴더를 제외한 모든 파일을 /app/out/assets 디렉토리로 이동
RUN mv /app/out/* /app/assets
RUN mv /app/assets/html /app/out
RUN mv /app/assets /app/out
# /app/out/html 디렉토리에서 index.html이랑 404.html을 제외한 모든 .html 파일의 확장자를 제거
RUN find /app/out/html -type f -name "*.html" -not -name "index.html" -not -name "404.html" -exec sh -c 'mv "$1" "${1%.html}"' _ {} \;

# html 폴더 생성, 파일 이동 및 확장자 제거를 하나의 스크립트로 통합
RUN mkdir -p /app/out/html /app/assets \
&& mv /app/out/*.html /app/out/html \
&& mv /app/out/* /app/assets \
&& mv /app/assets/html /app/out \
&& mv /app/assets /app/out \
&& find /app/out/html -type f -name "*.html" -not -name "index.html" -not -name "404.html" -exec sh -c 'mv "$1" "${1%.html}"' _ {} \;

RUN ls -alh /app/out
Loading

0 comments on commit ba8d6ae

Please sign in to comment.