Skip to content

Commit e0566cc

Browse files
authored
TailWind 기본 설정 (#7)
* chore: tailwind, postcss, autoprefixer 모듈 설치 * chore: config파일들을 eslint가 무시하도록 변경 * chore: tailwind 기본 init
1 parent 5dcec73 commit e0566cc

File tree

6 files changed

+469
-15
lines changed

6 files changed

+469
-15
lines changed

.eslintrc.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@
1515
"es2021": true
1616
},
1717
"plugins": ["@typescript-eslint", "prettier"],
18-
"extends": ["next/core-web-vitals","airbnb", "airbnb-typescript", "plugin:prettier/recommended"],
18+
"extends": [
19+
"next/core-web-vitals",
20+
"airbnb",
21+
"airbnb-typescript",
22+
"plugin:prettier/recommended"
23+
],
1924
"settings": {
2025
"react": {
2126
"version": "detect"
2227
}
2328
},
24-
"ignorePatterns": ["node_modules/", ".next/*"]
29+
"ignorePatterns": ["node_modules/", ".next/*", "*.config.js"]
2530
}

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@types/react-dom": "17.0.14",
2020
"@typescript-eslint/eslint-plugin": "^5.0.0",
2121
"@typescript-eslint/parser": "^5.0.0",
22+
"autoprefixer": "^10.4.4",
2223
"eslint": "8.12.0",
2324
"eslint-config-airbnb": "^19.0.4",
2425
"eslint-config-airbnb-typescript": "^16.2.0",
@@ -29,7 +30,9 @@
2930
"eslint-plugin-prettier": "^4.0.0",
3031
"eslint-plugin-react": "^7.28.0",
3132
"eslint-plugin-react-hooks": "^4.3.0",
33+
"postcss": "^8.4.12",
3234
"prettier": "^2.6.2",
35+
"tailwindcss": "^3.0.23",
3336
"typescript": "4.6.3"
3437
}
3538
}

postcss.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
};

styles/globals.css

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
15
html,
26
body {
37
padding: 0;

tailwind.config.js

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
module.exports = {
2+
purge: {
3+
enabled: true,
4+
content: ["./pages/**/*.{js,ts,jsx,tsx}", "./src/**/*.{js,ts,jsx,tsx}"],
5+
},
6+
darkMode: "media", // or 'media' or 'class'
7+
theme: {
8+
screen: {
9+
sm: { min: "640px", max: "767px" },
10+
md: { min: "768px", max: "1023px" },
11+
lg: { min: "1024px", max: "1279px" },
12+
xl: { min: "1280px", max: "1535px" },
13+
"2xl": { min: "1536px" },
14+
},
15+
extend: {
16+
fontFamily: {
17+
"eng-sub-font-1": ["Literata", "sans-serif"],
18+
"eng-sub-font-2": ["Poppins", "sans-serif"],
19+
},
20+
colors: {
21+
javascript: "#f1DD35",
22+
typescript: "#3178c6",
23+
html: "#e44b23",
24+
react: "#61DBFB",
25+
swift: "#ffac45",
26+
database: "#000000",
27+
git: "#171515",
28+
nestjs: "#e0234e",
29+
mysql: "#00758F",
30+
aws: "#FF9900",
31+
docker: "#0DB7ED",
32+
redis: "#A41E11",
33+
nodejs: "#68A063",
34+
css: "#264de4",
35+
},
36+
},
37+
},
38+
variants: {
39+
extend: {
40+
keyframes: {
41+
"fade-in-down": {
42+
"0%": {
43+
opacity: "0",
44+
transform: "translateY(-10px)",
45+
},
46+
"100%": {
47+
opacity: "1",
48+
transform: "translateY(0)",
49+
},
50+
},
51+
},
52+
animation: {
53+
"fade-in-down": "fade-in-down 0.5s ease-out",
54+
},
55+
},
56+
},
57+
plugins: [require("@tailwindcss/typography")],
58+
};

0 commit comments

Comments
 (0)