Skip to content

Commit

Permalink
refactor(package): ♻️ add index page & update package json
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed Aug 4, 2022
1 parent 93ef51a commit baefdfa
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 107 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
"description": "Personal Next React App",
"keywords": [
"react",
"template",
"next-react-app",
"typescript",
"new-project",
"new-repo"
"typescript"
],
"bugs": {
"url": "https://github.com/navin-moorthy/next-react-app/issues"
Expand All @@ -21,22 +18,23 @@
"license": "MIT",
"author": "Navin Moorthy <navin007.a@gmail.com>",
"scripts": {
"postinstall": "husky install",
"postinstall": "concurrently \"husky install\" \"patch-package\"",
"dev": "next dev",
"build": "next build",
"start": "next start",
"test": "jest --watch --watchAll=false",
"test:ci": "jest --ci",
"lint": "next lint",
"lint:fix": "eslint --color --ext .js,.jsx,.ts,.tsx . --fix",
"format": "prettier --check \"./**/*.{html,css,js,jsx,ts,tsx,md,json}\"",
"format:fix": "prettier -wl \"./**/*.{html,css,js,jsx,ts,tsx,md,json}\"",
"format:fix": "prettier --write --list-different --cache \"./**/*.{html,css,js,jsx,ts,tsx,md,json}\"",
"format:package": "sort-package-json package.json",
"build": "next build",
"start": "next start",
"release": "release-it",
"postpublish": "pinst --enable",
"size": "yarn build && size-limit",
"commit": "gacp",
"contrib:init": "all-contributors init",
"contrib:add": "all-contributors add",
"contrib:generate": "all-contributors generate"
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate"
},
"commitlint": {
"extends": [
Expand Down Expand Up @@ -79,7 +77,7 @@
"@testing-library/react": "13.3.0",
"@testing-library/user-event": "14.4.1",
"@types/jest": "28.1.6",
"@types/node": "17.0.41",
"@types/node": "18.6.3",
"@types/react": "18.0.15",
"@types/react-dom": "18.0.6",
"all-contributors-cli": "6.20.0",
Expand All @@ -95,6 +93,8 @@
"jest": "28.1.3",
"jest-environment-jsdom": "28.1.3",
"lint-staged": "13.0.3",
"patch-package": "6.4.7",
"pinst": "^3.0.0",
"postcss": "8.4.14",
"prettier": "2.7.1",
"release-it": "15.2.0",
Expand Down
85 changes: 6 additions & 79 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,85 +1,12 @@
import Head from "next/head";
import Image from "next/image";
import { Button } from "../components";

export default function Home() {
return (
<div className="flex flex-col items-center justify-center min-h-screen py-2">
<Head>
<title>Create Next App</title>
<link rel="icon" href="/favicon.ico" />
</Head>

<main className="flex flex-col items-center justify-center w-full flex-1 px-20 text-center">
<h1 className="text-6xl font-bold">
Welcome to{" "}
<a className="text-blue-600" href="https://nextjs.org">
Next.js!
</a>
</h1>

<p className="mt-3 text-2xl">
Get started by editing{" "}
<code className="p-3 font-mono text-lg bg-gray-100 rounded-md">
pages/index.js
</code>
</p>

<div className="flex flex-wrap items-center justify-around max-w-4xl mt-6 sm:w-full">
<a
href="https://nextjs.org/docs"
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600 transition-all"
>
<h3 className="text-2xl font-bold">Documentation &rarr;</h3>
<p className="mt-4 text-xl">
Find in-depth information about Next.js features and API.
</p>
</a>

<a
href="https://nextjs.org/learn"
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600 transition-all"
>
<h3 className="text-2xl font-bold">Learn &rarr;</h3>
<p className="mt-4 text-xl">
Learn about Next.js in an interactive course with quizzes!
</p>
</a>

<a
href="https://github.com/vercel/next.js/tree/master/examples"
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600 transition-all"
>
<h3 className="text-2xl font-bold">Examples &rarr;</h3>
<p className="mt-4 text-xl">
Discover and deploy boilerplate example Next.js projects.
</p>
</a>

<a
href="https://vercel.com/import?filter=next.js&utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600 transition-all"
>
<h3 className="text-2xl font-bold">Deploy &rarr;</h3>
<p className="mt-4 text-xl">
Instantly deploy your Next.js site to a public URL with Vercel.
</p>
</a>
</div>
</main>

<footer className="flex items-center justify-center w-full h-24 border-t">
<a
className="flex items-center justify-center"
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Powered by{" "}
<span className="h-4 ml-2">
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
</span>
</a>
</footer>
<div style={{ display: "flex", justifyContent: "center" }}>
<h1>
<p>Next React App</p>
</h1>
<Button>Hi</Button>
</div>
);
}
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// If you want to use other PostCSS plugins, see the following:
// https://tailwindcss.com/docs/using-with-preprocessors
module.exports = {
plugins: ["tailwindcss", "autoprefixer"],
plugins: ["tailwindcss/nesting", "tailwindcss", "autoprefixer"],
};
Loading

0 comments on commit baefdfa

Please sign in to comment.