Skip to content

Commit

Permalink
Update with-yarn with App Router. (#4850)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew committed May 9, 2023
1 parent 0ff46c9 commit 4b14ff3
Show file tree
Hide file tree
Showing 16 changed files with 529 additions and 330 deletions.
11 changes: 11 additions & 0 deletions examples/with-yarn/apps/docs/app/layout.tsx
@@ -0,0 +1,11 @@
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
10 changes: 10 additions & 0 deletions examples/with-yarn/apps/docs/app/page.tsx
@@ -0,0 +1,10 @@
import { Button, Header } from "ui";

export default function Page() {
return (
<>
<Header text="Docs" />
<Button />
</>
);
}
6 changes: 3 additions & 3 deletions examples/with-yarn/apps/docs/package.json
Expand Up @@ -9,15 +9,15 @@
"lint": "next lint"
},
"dependencies": {
"next": "latest",
"next": "^13.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"ui": "*"
},
"devDependencies": {
"@types/node": "^17.0.12",
"@types/react": "^18.0.22",
"@types/react-dom": "^18.0.7",
"@types/react": "^18.2.5",
"@types/react-dom": "^18.2.4",
"eslint-config-custom": "*",
"tsconfig": "*",
"typescript": "^4.5.3"
Expand Down
10 changes: 0 additions & 10 deletions examples/with-yarn/apps/docs/pages/index.tsx

This file was deleted.

5 changes: 4 additions & 1 deletion examples/with-yarn/apps/docs/tsconfig.json
@@ -1,5 +1,8 @@
{
"extends": "tsconfig/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"plugins": [{ "name": "next" }]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
11 changes: 11 additions & 0 deletions examples/with-yarn/apps/web/app/layout.tsx
@@ -0,0 +1,11 @@
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
10 changes: 10 additions & 0 deletions examples/with-yarn/apps/web/app/page.tsx
@@ -0,0 +1,10 @@
import { Button, Header } from "ui";

export default function Page() {
return (
<>
<Header text="Web" />
<Button />
</>
);
}
6 changes: 3 additions & 3 deletions examples/with-yarn/apps/web/package.json
Expand Up @@ -9,15 +9,15 @@
"lint": "next lint"
},
"dependencies": {
"next": "latest",
"next": "^13.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"ui": "*"
},
"devDependencies": {
"@types/node": "^17.0.12",
"@types/react": "^18.0.22",
"@types/react-dom": "^18.0.7",
"@types/react": "^18.2.5",
"@types/react-dom": "^18.2.4",
"eslint-config-custom": "*",
"tsconfig": "*",
"typescript": "^4.5.3"
Expand Down
10 changes: 0 additions & 10 deletions examples/with-yarn/apps/web/pages/index.tsx

This file was deleted.

5 changes: 4 additions & 1 deletion examples/with-yarn/apps/web/tsconfig.json
@@ -1,5 +1,8 @@
{
"extends": "tsconfig/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"plugins": [{ "name": "next" }]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
8 changes: 4 additions & 4 deletions examples/with-yarn/package.json
Expand Up @@ -5,15 +5,15 @@
"packages/*"
],
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev --parallel",
"lint": "turbo run lint"
"build": "turbo build",
"dev": "turbo dev --parallel",
"lint": "turbo lint"
},
"devDependencies": {
"eslint-config-custom": "*",
"eslint": "7.32.0",
"prettier": "^2.5.1",
"turbo": "latest"
"turbo": "^1.9.3"
},
"packageManager": "yarn@1.22.19"
}
6 changes: 3 additions & 3 deletions examples/with-yarn/packages/eslint-config-custom/package.json
Expand Up @@ -4,14 +4,14 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"eslint-config-next": "latest",
"eslint-config-next": "^13.4.1",
"eslint-config-prettier": "^8.3.0",
"eslint-config-turbo": "latest",
"eslint-config-turbo": "^1.9.3",
"eslint-plugin-react": "7.28.0"
},
"devDependencies": {
"eslint": "7.32.0",
"next": "latest",
"next": "^13.4.1",
"react": "18.2",
"react-dom": "18.2",
"typescript": "^4.5.3"
Expand Down
1 change: 1 addition & 0 deletions examples/with-yarn/packages/tsconfig/nextjs.json
Expand Up @@ -3,6 +3,7 @@
"display": "Next.js",
"extends": "./base.json",
"compilerOptions": {
"plugins": [{ "name": "next" }],
"allowJs": true,
"declaration": false,
"declarationMap": false,
Expand Down
5 changes: 5 additions & 0 deletions examples/with-yarn/packages/ui/Header.tsx
@@ -0,0 +1,5 @@
import * as React from "react";

export const Header = ({ text }: { text: string }) => {
return <h1>{text}</h1>;
};
1 change: 1 addition & 0 deletions examples/with-yarn/packages/ui/index.tsx
@@ -1,2 +1,3 @@
import * as React from "react";
export * from "./Button";
export * from "./Header";

0 comments on commit 4b14ff3

Please sign in to comment.