Skip to content

Commit

Permalink
Update kitchen-sink with App Router. (#4840)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew committed May 16, 2023
1 parent 3b22f1c commit 75e7ddc
Show file tree
Hide file tree
Showing 12 changed files with 167 additions and 87 deletions.
4 changes: 2 additions & 2 deletions examples/kitchen-sink/apps/storefront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"clean": "rm -rf .next",
"dev": "next dev -p 3002",
"lint": "next lint",
"start": "next start "
"start": "next start"
},
"dependencies": {
"logger": "workspace:*",
"next": "latest",
"next": "^13.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"ui": "workspace:*"
Expand Down
13 changes: 13 additions & 0 deletions examples/kitchen-sink/apps/storefront/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import "./styles.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,14 +1,14 @@
import { log } from "logger";
import Head from "next/head";
import { CounterButton, NewTabLink } from "ui";

export const metadata = {
title: "Store | Kitchen Sink",
};

export default function Store() {
log("Hey! This is Home.");
return (
<div className="container">
<Head>
<title>Store | Kitchen Sink</title>
</Head>
<h1 className="title">
Store <br />
<span>Kitchen Sink</span>
Expand Down
55 changes: 55 additions & 0 deletions examples/kitchen-sink/apps/storefront/src/app/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
html {
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-tap-highlight-color: transparent;
line-height: 1.5;
tab-size: 4;
}

body {
margin: 0;
}

.container {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1.5rem;
max-width: 100%;
margin: 0 auto;
padding: 0 16px;
text-align: center;
}

.title {
font-size: 3rem;
font-weight: 700;
margin: 0;
}

.title span {
display: inline-block;
background-image: linear-gradient(to right, #3b82f6, #ef4444);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}

.description {
color: #9ca3af;
font-weight: 500;
}

.description a {
color: #3b82f6;
text-decoration: none;
}

.description a:hover {
text-decoration: underline;
}
6 changes: 0 additions & 6 deletions examples/kitchen-sink/apps/storefront/src/pages/_app.tsx

This file was deleted.

10 changes: 7 additions & 3 deletions examples/kitchen-sink/apps/storefront/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
"exclude": ["node_modules"],
"extends": "tsconfig/nextjs.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
"outDir": "dist",
"plugins": [
{
"name": "next"
}
]
},
"include": ["src", "next-env.d.ts"]
"include": ["src", "next-env.d.ts", ".next/types/**/*.ts"]
}
12 changes: 6 additions & 6 deletions examples/kitchen-sink/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"private": true,
"scripts": {
"build": "turbo run build",
"clean": "turbo run clean",
"dev": "turbo run dev --no-cache --continue",
"build": "turbo build",
"clean": "turbo clean",
"dev": "turbo dev --no-cache --continue",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"lint": "turbo run lint",
"test": "turbo run test"
"lint": "turbo lint",
"test": "turbo test"
},
"devDependencies": {
"prettier": "^2.7.1",
"turbo": "latest"
"turbo": "^1.9.3"
},
"packageManager": "pnpm@7.15.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"main": "index.js",
"dependencies": {
"eslint-config-turbo": "latest"
"eslint-config-turbo": "^1.9.3"
},
"publishConfig": {
"access": "public"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"license": "MIT",
"main": "index.js",
"dependencies": {
"eslint-config-next": "latest",
"eslint-config-next": "^13.4.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "7.28.0",
"eslint-config-turbo": "latest"
"eslint-config-turbo": "^1.9.3"
},
"publishConfig": {
"access": "public"
Expand Down
1 change: 1 addition & 0 deletions examples/kitchen-sink/packages/tsconfig/nextjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"display": "Next.js",
"extends": "./base.json",
"compilerOptions": {
"plugins": [{ "name": "next" }],
"allowJs": true,
"declaration": false,
"declarationMap": false,
Expand Down
8 changes: 8 additions & 0 deletions examples/kitchen-sink/packages/ui/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig, Options } from "tsup";

export default defineConfig((options: Options) => ({
banner: {
js: "'use client'",
},
...options,
}));
Loading

1 comment on commit 75e7ddc

@vercel
Copy link

@vercel vercel bot commented on 75e7ddc 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-kitchensink-blog – ./examples/kitchen-sink/apps/blog

examples-kitchensink-blog.vercel.sh
examples-kitchensink-blog-git-main.vercel.sh

Please sign in to comment.