Skip to content

Commit 8b6e496

Browse files
committed
chore: setup next
1 parent 08fea4d commit 8b6e496

File tree

16 files changed

+2014
-2
lines changed

16 files changed

+2014
-2
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.idea/
2+
.vscode/
3+
node_modules/
4+
build/
5+
.DS_Store
6+
*.tgz
7+
my-app*
8+
template/src/__tests__/__snapshots__/
9+
lerna-debug.log
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
/.changelog
14+
.npm/
15+
.next/

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# gitletter
2-
Launch a newsletter using GitHub. Either create or use an existing repo like a markdown blog.
1+
# GitLetter
2+
3+
Launch a newsletter using GitHub! Issues stored as markdown files in any repository (e.g. your blog).

gitletter/.eslintrc.json

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

gitletter/.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
.pnpm-debug.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo

next-env.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

next.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
reactStrictMode: true,
4+
}
5+
6+
module.exports = nextConfig

package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "gitletter",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "next lint"
10+
},
11+
"dependencies": {
12+
"next": "12.1.6",
13+
"react": "18.1.0",
14+
"react-dom": "18.1.0"
15+
},
16+
"devDependencies": {
17+
"@types/node": "17.0.39",
18+
"@types/react": "18.0.11",
19+
"@types/react-dom": "18.0.5",
20+
"eslint": "8.17.0",
21+
"eslint-config-next": "12.1.6",
22+
"typescript": "4.7.3"
23+
}
24+
}

pages/_app.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import '../styles/globals.css'
2+
import type { AppProps } from 'next/app'
3+
4+
function MyApp({ Component, pageProps }: AppProps) {
5+
return <Component {...pageProps} />
6+
}
7+
8+
export default MyApp

pages/api/hello.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2+
import type { NextApiRequest, NextApiResponse } from 'next'
3+
4+
type Data = {
5+
name: string
6+
}
7+
8+
export default function handler(
9+
req: NextApiRequest,
10+
res: NextApiResponse<Data>
11+
) {
12+
res.status(200).json({ name: 'John Doe' })
13+
}

pages/index.tsx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import type { NextPage } from 'next'
2+
import Head from 'next/head'
3+
import Image from 'next/image'
4+
import styles from '../styles/Home.module.css'
5+
6+
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+
Launch a newsletter using Github!
18+
</h1>
19+
20+
<p className={styles.description}>
21+
Issues stored as markdown files in any repository (e.g. your blog).
22+
</p>
23+
24+
<div className={styles.grid}>
25+
[demo image]
26+
</div>
27+
</main>
28+
29+
<footer className={styles.footer}>
30+
<a
31+
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
32+
target="_blank"
33+
rel="noopener noreferrer"
34+
>
35+
Twitter
36+
</a>
37+
</footer>
38+
</div>
39+
)
40+
}
41+
42+
export default Home

0 commit comments

Comments
 (0)