Skip to content

Commit 4a1b950

Browse files
author
Mathis Barré
committed
feat: upgrade nextjs & tailwindcss
1 parent fda82cc commit 4a1b950

22 files changed

+1319
-3656
lines changed

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.gitignore

+5-4
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323
npm-debug.log*
2424
yarn-debug.log*
2525
yarn-error.log*
26+
.pnpm-debug.log*
2627

2728
# local env files
28-
.env.local
29-
.env.development.local
30-
.env.test.local
31-
.env.production.local
29+
.env*.local
3230

3331
# vercel
3432
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo

.vscode/settings.json

-25
This file was deleted.

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ yarn dev
1212

1313
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
1414

15-
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
15+
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
16+
17+
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
18+
19+
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
1620

1721
## Learn More
1822

@@ -25,6 +29,6 @@ You can check out [the Next.js GitHub repository](https://github.com/vercel/next
2529

2630
## Deploy on Vercel
2731

28-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/import?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
32+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
2933

3034
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

next-env.d.ts

-1
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

next.config.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
const withPWA = require("next-pwa");
1+
/** @type {import('next').NextConfig} */
22

3-
module.exports = withPWA({
4-
pwa: {
5-
dest: "public",
6-
disable: process.env.NODE_ENV === "development",
7-
},
3+
const nextConfig = {
4+
reactStrictMode: true,
85
async rewrites() {
96
return [
107
{
@@ -17,4 +14,6 @@ module.exports = withPWA({
1714
},
1815
];
1916
},
20-
});
17+
}
18+
19+
module.exports = nextConfig

package.json

+14-13
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,24 @@
55
"scripts": {
66
"dev": "next dev",
77
"build": "next build",
8-
"start": "next start"
8+
"start": "next start",
9+
"lint": "next lint"
910
},
1011
"dependencies": {
1112
"@splitbee/web": "^0.2.4",
12-
"@tailwindcss/aspect-ratio": "^0.2.0",
13-
"autoprefixer": "^10.2.5",
14-
"next": "^11.1.0",
15-
"next-pwa": "^5.2.24",
16-
"postcss": "^8.2.2",
17-
"react": "^17.0.2",
18-
"react-dom": "^17.0.2",
19-
"tailwindcss": "^2.0.2"
13+
"next": "12.1.4",
14+
"react": "18.0.0",
15+
"react-dom": "18.0.0"
2016
},
2117
"devDependencies": {
22-
"@tailwindcss/jit": "^0.1.18",
23-
"@types/node": "^14.14.20",
24-
"@types/react": "^17.0.0",
25-
"typescript": "^4.1.3"
18+
"@types/node": "17.0.23",
19+
"@types/react": "18.0.1",
20+
"@types/react-dom": "18.0.0",
21+
"autoprefixer": "^10.4.4",
22+
"eslint": "8.13.0",
23+
"eslint-config-next": "12.1.4",
24+
"postcss": "^8.4.12",
25+
"tailwindcss": "^3.0.23",
26+
"typescript": "4.6.3"
2627
}
2728
}

postcss.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
plugins: {
3-
"@tailwindcss/jit": {},
3+
tailwindcss: {},
44
autoprefixer: {},
55
},
6-
};
6+
}

public/android-chrome-192x192.png

-40.8 KB
Binary file not shown.

public/android-chrome-512x512.png

-247 KB
Binary file not shown.

public/apple-touch-icon.png

-36.8 KB
Binary file not shown.

public/favicon-16x16.png

-738 Bytes
Binary file not shown.

public/favicon-32x32.png

-1.96 KB
Binary file not shown.

public/robots.txt

-2
This file was deleted.

public/site.webmanifest

-19
This file was deleted.

public/sw.js

-1
This file was deleted.

public/workbox-ea903bce.js

-1
This file was deleted.

src/components/pages/Intro/Intro.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function Intro() {
1414

1515
<h2 className="title-section">Qui suis-je ?</h2>
1616
<p className="text-gray-200 ">
17-
Je suis un jeune développeur web et mobile français qui passe du temps à faire <a className="link" href="https://www.youtube.com/channel/UCl3-1zqMl6YkRx0OQ3KwC_g">du contenu</a> et <a className="link" href="https://devs.coffee">des projets</a> sur mon temps libre ! J'ai récemment appris le développement mobile, et je me spécialise dans le développement front-end en explorant les tests, l'architecture et autre. Mon prochain objectif est de devenir plus polyvalent en maitrisant aussi le développement back-end.
17+
Je suis un jeune développeur web et mobile français qui passe du temps à faire <a className="link" href="https://www.youtube.com/channel/UCl3-1zqMl6YkRx0OQ3KwC_g">du contenu</a> et <a className="link" href="https://devs.coffee">des projets</a> sur mon temps libre ! J&apos;ai récemment appris le développement mobile, et je me spécialise dans le développement front-end en explorant les tests, l&apos;architecture et autre. Mon prochain objectif est de devenir plus polyvalent en maitrisant aussi le développement back-end.
1818
</p>
1919
</section>
2020
)

src/components/pages/Technologies/Technologies.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ export default function Technologies() {
22
return (
33
<section>
44
<h2 className="title-section">Quels sont les technologies que je maitrise ?</h2>
5-
<p className="mb-2 text-gray-200 ">J'adore travailler avec <span className="bold">tailwindcss</span>, <span className="bold">React</span> et <span className="bold">Next.js</span> avec <span className="bold">TypeScript</span> quand je fais du développement front-end. Mais j'ai aussi appris <span className="bold">Vue.js</span> durant mon alternance chez Lion Coach. J'apprends le développement mobile en <span className=" bold">React Native</span> grâce à Beapp, c'est actuellement ce que je fais au quotidien.</p>
5+
<p className="mb-2 text-gray-200 ">J&apos;adore travailler avec <span className="bold">tailwindcss</span>, <span className="bold">React</span> et <span className="bold">Next.js</span> avec <span className="bold">TypeScript</span> quand je fais du développement front-end. Mais j&apos;ai aussi appris <span className="bold">Vue.js</span> durant mon alternance chez Lion Coach. J&apos;apprends le développement mobile en <span className=" bold">React Native</span> grâce à Beapp, c&apos;est actuellement ce que je fais au quotidien.</p>
66
<p className="mb-2 text-gray-200 ">
7-
Durant mon année d'alternance, j'ai appris les rudiments du back-end. Je connais <span className="bold">express.js</span> mais je préfère <span className="bold">fastify</span> avec <span className="bold">Prisma ORM</span>. J'ai pour objectif moyen terme d'approfondir mes connaissances en back-end <span className="bold">Node.js</span> mais aussi en <span className="bold">PHP</span> avec <span className="bold">Symfony</span>.
7+
Durant mon année d&apos;alternance, j&apos;ai appris les rudiments du back-end. Je connais <span className="bold">express.js</span> mais je préfère <span className="bold">fastify</span> avec <span className="bold">Prisma ORM</span>. J&apos;ai pour objectif moyen terme d&apos;approfondir mes connaissances en back-end <span className="bold">Node.js</span> mais aussi en <span className="bold">PHP</span> avec <span className="bold">Symfony</span>.
88
</p>
99
</section >
1010
)

tailwind.config.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
module.exports = {
2-
purge: ["./src/pages/**/*.tsx", "./src/components/**/*.tsx"],
3-
darkMode: false, // or 'media' or 'class'
4-
mode: "jit",
2+
content: [
3+
"./src/pages/**/*.{js,ts,jsx,tsx}",
4+
"./src/components/**/*.{js,ts,jsx,tsx}",
5+
],
56
theme: {
67
extend: {
78
spacing: {
@@ -16,8 +17,5 @@ module.exports = {
1617
},
1718
},
1819
},
19-
variants: {
20-
extend: {},
21-
},
22-
plugins: [require("@tailwindcss/aspect-ratio")],
23-
};
20+
plugins: [],
21+
}

tsconfig.json

+4-17
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
8-
],
4+
"lib": ["dom", "dom.iterable", "esnext"],
95
"allowJs": true,
106
"skipLibCheck": true,
117
"strict": true,
@@ -17,17 +13,8 @@
1713
"resolveJsonModule": true,
1814
"isolatedModules": true,
1915
"jsx": "preserve",
20-
"baseUrl": ".",
21-
"paths": {
22-
"@/*": ["./*"],
23-
}
16+
"incremental": true
2417
},
25-
"include": [
26-
"next-env.d.ts",
27-
"**/*.ts",
28-
"**/*.tsx"
29-
],
30-
"exclude": [
31-
"node_modules"
32-
]
18+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
19+
"exclude": ["node_modules"]
3320
}

0 commit comments

Comments
 (0)