Skip to content

Commit

Permalink
Upgrade supports
Browse files Browse the repository at this point in the history
  • Loading branch information
Bunlong committed Aug 2, 2023
1 parent 4ca2d9b commit a5c524d
Show file tree
Hide file tree
Showing 26 changed files with 63 additions and 433 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"dist"
],
"dependencies": {
"qrcode": "^1.5.1"
"qrcode": "^1.5.3"
},
"bundlesize": [
{
Expand Down
36 changes: 0 additions & 36 deletions supports/create-next-app/.gitignore

This file was deleted.

27 changes: 3 additions & 24 deletions supports/create-next-app/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,13 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started
## Create Next App

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm 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.
5 changes: 1 addition & 4 deletions supports/create-next-app/next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
}
const nextConfig = {}

module.exports = nextConfig
18 changes: 8 additions & 10 deletions supports/create-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@
"lint": "next lint"
},
"dependencies": {
"next": "12.3.1",
"@types/node": "20.4.5",
"@types/react": "18.2.18",
"@types/react-dom": "18.2.7",
"eslint": "8.46.0",
"eslint-config-next": "13.4.12",
"next": "13.4.12",
"next-qrcode": "file:../..",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/node": "18.11.0",
"@types/react": "18.0.21",
"@types/react-dom": "18.0.6",
"eslint": "8.25.0",
"eslint-config-next": "12.3.1",
"typescript": "4.8.4"
"react-dom": "18.2.0",
"typescript": "5.1.6"
}
}
8 changes: 0 additions & 8 deletions supports/create-next-app/pages/_app.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions supports/create-next-app/pages/api/hello.ts

This file was deleted.

4 changes: 0 additions & 4 deletions supports/create-next-app/public/vercel.svg

This file was deleted.

File renamed without changes.
21 changes: 21 additions & 0 deletions supports/create-next-app/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'

const inter = Inter({ subsets: ['latin'] })

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
)
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import type { NextPage } from 'next'
'use client'

import { useQRCode } from 'next-qrcode'

const Home: NextPage = () => {
const { Canvas, Image, SVG } = useQRCode()
export default function Home() {
const {
Canvas,
// Image,
// SVG,
} = useQRCode()

return (
<>
<main>
<Canvas
text={'https://github.com/bunlong/next-qrcode'}
options={{
Expand Down Expand Up @@ -57,8 +62,6 @@ const Home: NextPage = () => {
},
}}
/> */}
</>
</main>
)
}

export default Home
129 changes: 0 additions & 129 deletions supports/create-next-app/styles/Home.module.css

This file was deleted.

26 changes: 0 additions & 26 deletions supports/create-next-app/styles/globals.css

This file was deleted.

14 changes: 11 additions & 3 deletions supports/create-next-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
Loading

0 comments on commit a5c524d

Please sign in to comment.