Initial commit from Create Next App

This commit is contained in:
2022-08-13 11:29:32 -05:00
commit 8573d61066
24 changed files with 3172 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"standard",
"plugin:@next/next/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
"indent": [
"error",
2
],
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": [
"error"
],
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [
"warn",
{
"extensions": [
".tsx"
]
}
]
},
"settings": {
"react": {
"version": "detect"
}
}
}
+39
View File
@@ -0,0 +1,39 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# vercel
.vercel
# typescript
*.tsbuildinfo
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no -- commitlint --edit "${1}"
+58
View File
@@ -0,0 +1,58 @@
# SrJuggernaut Next Template
This is a template for a new SrJuggernaut Next project.
## Modifications
- TypeScript
- eslint
- Standard
- Commitlint
## Use this template
### Yarn
```bash
yarn create next-app my-app -e https://github.com/SrJuggernaut/next-template/tree/clean
cd my-app
yarn husky install
```
### NPM
```bash
npx create-next-app@latest my-app -e https://github.com/SrJuggernaut/next-template/tree/clean
cd my-app
npx husky install
```
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
[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`.
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.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## Deploy on Vercel
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.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
+1
View File
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] }
+5
View File
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
+6
View File
@@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true
}
module.exports = nextConfig
+35
View File
@@ -0,0 +1,35 @@
{
"name": "next-template",
"version": "0.1.0",
"private": true,
"scripts": {
"develop": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"postinstall": "husky install"
},
"dependencies": {
"next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@types/node": "18.7.3",
"@types/react": "18.0.17",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"eslint": "^8.0.1",
"eslint-config-next": "12.2.5",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.30.1",
"husky": "^8.0.1",
"typescript": "4.7.4"
}
}
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File
View File
View File
View File
View File
View File
+9
View File
@@ -0,0 +1,9 @@
import type { AppProps } from 'next/app'
const MyApp = ({ Component, pageProps }: AppProps) => {
return (
<Component {...pageProps} />
)
}
export default MyApp
+12
View File
@@ -0,0 +1,12 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from 'next'
type Data = {
message: string
}
export const hello = (req: NextApiRequest, res: NextApiResponse<Data>) => {
res.status(200).json({ message: 'Hello!' })
}
export default hello
+11
View File
@@ -0,0 +1,11 @@
import type { NextPage } from 'next'
const Home: NextPage = () => {
return (
<>
<h1>Next Js</h1>
</>
)
}
export default Home
View File
View File
View File
+66
View File
@@ -0,0 +1,66 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"baseUrl": "src",
"paths": {
"@adapters/*": [
"adapters/*"
],
"@assets/*": [
"assets/*"
],
"@components/*": [
"components/*"
],
"@contexts/*": [
"contexts/*"
],
"@hooks/*": [
"hooks/*"
],
"@interfaces/*": [
"interfaces/*"
],
"@pages/*": [
"pages/*"
],
"@public/*": [
"../public/*"
],
"@services/*": [
"services/*"
],
"@styles/*": [
"styles/*"
],
"@utilities/*": [
"utilities/*"
],
},
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
}
+2879
View File
File diff suppressed because it is too large Load Diff