Skip to content

jeonbyeongmin/yum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Yum


🏁 개발 ν™˜κ²½μ—μ„œ μ‹œμž‘ν•˜κΈ°

$ yarn run dev

🚧 ν™˜κ²½ μ„€μ •κ³Ό κ·œμΉ™

  1. μ†ŒμŠ€μ½”λ“œ μœ„μΉ˜ . μ—μ„œ ./src 둜 이동. pages, styles λ₯Ό λΉ„λ‘―ν•œ λͺ¨λ“  μ½”λ“œ src λ‚΄μ—μ„œ μž‘μ„±

  2. μ ˆλŒ€κ²½λ‘œ μ‚¬μš©

{
  "compilerOptions": {
    "baseUrl": "src"
  }
}
// μ†ŒμŠ€μ½”λ“œ λ‚΄μ—μ„œ μ•„λž˜μ˜ μ˜ˆμ‹œμ²˜λŸΌ src의 ν•˜μœ„ 디렉토리뢀터 μž…λ ₯
import Card from 'components/Card';
  1. prettier μ„€μ •
{
  "printWidth": 80, // 쀄 λ°”κΏˆ 폭
  "tabWidth": 2, // νƒ­ λ„ˆλΉ„
  "useTabs": false, // 슀페이슀 λŒ€μ‹  νƒ­ μ‚¬μš©
  "semi": true, // μ„Έλ―Έμ½œλ‘  μ‚¬μš©
  "singleQuote": true, // μž‘μ€ λ”°μ˜΄ν‘œ μ‚¬μš©
  "trailingComma": "all", // 꼬리 콀마 μ‚¬μš©
  "bracketSpacing": false, // 객체 λ¦¬ν„°λŸ΄μ—μ„œ κ΄„ν˜Έμ— 곡백
  "arrowParens": "avoid", // ν™”μ‚΄ν‘œ ν•¨μˆ˜ κ΄„ν˜Έ μ‚¬μš© 방식
  "proseWrap": "preserve", // λ§ˆν¬λ‹€μš΄ μ€„λ°”κΏˆ 방식
  "endOfLine": "auto" // κ°œν–‰ 문자 μœ μ§€
}

🌲 디렉토리 ꡬ쑰 (λ³€κ²½ μ˜ˆμ •)

β”œβ”€β”€ api
β”œβ”€β”€ common
β”‚Β Β  β”œβ”€β”€ types
β”‚Β Β  └── utils
β”œβ”€β”€ components
β”œβ”€β”€ hooks
β”œβ”€β”€ pages
β”‚Β Β  β”œβ”€β”€ _app.tsx
β”‚Β Β  β”œβ”€β”€ _document.tsx
β”‚Β Β  └── index.tsx
└── styles
    β”œβ”€β”€ Home.module.css
    └── globals.css

πŸ›  μ‚¬μš©

  1. Next.js
  2. Emotion
  3. recoil
  4. react-query

πŸ“± media-query μ‚¬μš©

theme.ts 에 pc, tablet, mobile μ„Έ κ°€μ§€λ‘œ λ‚˜λˆ μ„œ export ν•΄λ‘μ—ˆμŒ.

// theme.ts

const useMediaQuery = (maxWidth: number): string =>
  `@media (max-width: ${maxWidth}px)`;

export const media = {
  pc: useMediaQuery(1440),
  tablet: useMediaQuery(768),
  mobile: useMediaQuery(576),
};

export const theme = {
  colors: {
    primary: 'orange',
  },
};

Usage

μ•„λž˜μ™€ 같이 μ‚¬μš©

const Wrapper = styled.div`
  ...
  ${media.tablet} {
    display: none;
    ...
  }
`;

About

πŸ“Œ HCI ν”„λ‘œμ νŠΈ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •