Skip to content

Commit

Permalink
Update non-monorepo with App Router. (#4842)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew authored May 16, 2023
1 parent 915523c commit 18f2b1a
Show file tree
Hide file tree
Showing 9 changed files with 812 additions and 463 deletions.
File renamed without changes.
13 changes: 13 additions & 0 deletions examples/non-monorepo/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import "../styles/globals.css";

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import Head from "next/head";
import { Metadata } from "next";
import Image from "next/image";
import styles from "../styles/Home.module.css";

export default function Home() {
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create-next-app",
};

export default function Page() {
return (
<div className={styles.container}>
<Head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
<link rel="icon" href="/favicon.ico" />
</Head>

<main className={styles.main}>
<h1 className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js!</a>
Expand Down
File renamed without changes
6 changes: 3 additions & 3 deletions examples/non-monorepo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"@types/react": "18.2.0",
"@types/react-dom": "^18.0.6",
"eslint": "8.27.0",
"eslint-config-next": "latest",
"next": "13.0.2",
"eslint-config-next": "^13.4.1",
"next": "^13.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "4.8.4"
},
"devDependencies": {
"turbo": "latest"
"turbo": "^1.9.3"
},
"packageManager": "[email protected]"
}
6 changes: 0 additions & 6 deletions examples/non-monorepo/pages/_app.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions examples/non-monorepo/pages/api/hello.ts

This file was deleted.

9 changes: 7 additions & 2 deletions examples/non-monorepo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
"incremental": true,
"plugins": [
{
"name": "next"
}
]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
1,213 changes: 782 additions & 431 deletions examples/non-monorepo/yarn.lock

Large diffs are not rendered by default.

1 comment on commit 18f2b1a

@vercel
Copy link

@vercel vercel bot commented on 18f2b1a May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

examples-nonmonorepo – ./examples/non-monorepo

examples-nonmonorepo-git-main.vercel.sh
examples-nonmonorepo.vercel.sh

Please sign in to comment.