Skip to content

Commit 9f6870d

Browse files
committed
feat: add tailwindcss
1 parent 5630e09 commit 9f6870d

File tree

11 files changed

+278
-213
lines changed

11 files changed

+278
-213
lines changed

.stylelintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"stylelint-config-prettier-scss",
55
"stylelint-config-standard",
66
"stylelint-config-prettier",
7-
"stylelint-config-rational-order"
7+
"stylelint-config-rational-order",
8+
"stylelint-config-tailwindcss/scss"
89
],
910
"plugins": ["stylelint-order", "stylelint-config-rational-order/plugin"],
1011
"rules": {

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"css.validate": false,
3+
"scss.validate": false
4+
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"dev": "next dev",
1111
"build": "next build",
1212
"start": "next start",
13+
"lint:style": "stylelint **/*.{css,scss,sass}",
14+
"lint:style:fix": "stylelint **/*.{css,scss,sass} --fix",
1315
"release": "standard-version",
1416
"release:first": "yarn release --first-release",
1517
"prepare": "husky install",
@@ -32,14 +34,15 @@
3234
"@types/node": "17.0.23",
3335
"@types/react": "17.0.43",
3436
"@types/react-dom": "17.0.14",
37+
"autoprefixer": "^10.4.13",
3538
"commitizen": "^4.2.5",
3639
"eslint": "8.12.0",
3740
"eslint-config-next": "12.1.2",
3841
"eslint-config-prettier": "^8.5.0",
3942
"husky": "^7.0.4",
4043
"inquirer": "8",
4144
"lint-staged": "^12.3.7",
42-
"postcss": "^8.4.12",
45+
"postcss": "^8.4.19",
4346
"prettier": "2.6.2",
4447
"sass": "^1.49.11",
4548
"standard-version": "^9.3.2",
@@ -49,7 +52,9 @@
4952
"stylelint-config-rational-order": "^0.1.2",
5053
"stylelint-config-standard": "^25.0.0",
5154
"stylelint-config-standard-scss": "^3.0.0",
55+
"stylelint-config-tailwindcss": "^0.0.7",
5256
"stylelint-order": "^5.0.0",
57+
"tailwindcss": "^3.2.4",
5358
"typescript": "^4.6.0"
5459
}
5560
}

pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '../styles/globals.css'
1+
import '../styles/globals.scss'
22
import type { AppProps } from 'next/app'
33

44
function MyApp({ Component, pageProps }: AppProps) {

pages/index.tsx

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,7 @@
11
import type { NextPage } from 'next'
2-
import Head from 'next/head'
3-
import Image from 'next/image'
4-
import styles from '../styles/Home.module.scss'
52

63
const Home: NextPage = () => {
7-
return (
8-
<div className={styles.container}>
9-
<Head>
10-
<title>Create Next App</title>
11-
<meta name="description" content="Generated by create next app" />
12-
<link rel="icon" href="/favicon.ico" />
13-
</Head>
14-
15-
<main className={styles.main}>
16-
<h1 className={styles.title}>
17-
Welcome to <a href="https://nextjs.org">Next.js!</a>
18-
</h1>
19-
20-
<p className={styles.description}>
21-
Get started by editing{' '}
22-
<code className={styles.code}>pages/index.tsx</code>
23-
</p>
24-
25-
<div className={styles.grid}>
26-
<a href="https://nextjs.org/docs" className={styles.card}>
27-
<h2>Documentation &rarr;</h2>
28-
<p>Find in-depth information about Next.js features and API.</p>
29-
</a>
30-
31-
<a href="https://nextjs.org/learn" className={styles.card}>
32-
<h2>Learn &rarr;</h2>
33-
<p>Learn about Next.js in an interactive course with quizzes!</p>
34-
</a>
35-
36-
<a
37-
href="https://github.com/vercel/next.js/tree/canary/examples"
38-
className={styles.card}
39-
>
40-
<h2>Examples &rarr;</h2>
41-
<p>Discover and deploy boilerplate example Next.js projects.</p>
42-
</a>
43-
44-
<a
45-
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
46-
className={styles.card}
47-
>
48-
<h2>Deploy &rarr;</h2>
49-
<p>
50-
Instantly deploy your Next.js site to a public URL with Vercel.
51-
</p>
52-
</a>
53-
</div>
54-
</main>
55-
56-
<footer className={styles.footer}>
57-
<a
58-
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
59-
target="_blank"
60-
rel="noopener noreferrer"
61-
>
62-
Powered by{' '}
63-
<span className={styles.logo}>
64-
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
65-
</span>
66-
</a>
67-
</footer>
68-
</div>
69-
)
4+
return <h1 className="text-3xl font-bold underline">Hello world!</h1>
705
}
716

727
export default Home

postcss.config.js

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

styles/Home.module.scss

Lines changed: 0 additions & 116 deletions
This file was deleted.

styles/globals.css

Lines changed: 0 additions & 16 deletions
This file was deleted.

styles/globals.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

tailwind.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/** @type {import('tailwindcss').Config} */
2+
module.exports = {
3+
content: [
4+
'./pages/**/*.{js,ts,jsx,tsx}',
5+
'./components/**/*.{js,ts,jsx,tsx}',
6+
],
7+
theme: {
8+
extend: {},
9+
},
10+
plugins: [],
11+
}

0 commit comments

Comments
 (0)