aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/examples/kitchen-sink/apps/storefront
diff options
context:
space:
mode:
author简律纯 <hsiangnianian@outlook.com>2023-04-28 01:47:57 +0800
committer简律纯 <hsiangnianian@outlook.com>2023-04-28 01:47:57 +0800
commit8b2c4a38a461ff5ecc95972291bc711e2c5dec9a (patch)
tree29f552e3df949073e21bf5c76d7abc3044830ec6 /examples/kitchen-sink/apps/storefront
parentfc8c5fdce62fb229202659408798a7b6c98f6e8b (diff)
downloadHydroRoll-8b2c4a38a461ff5ecc95972291bc711e2c5dec9a.tar.gz
HydroRoll-8b2c4a38a461ff5ecc95972291bc711e2c5dec9a.zip
Diffstat (limited to 'examples/kitchen-sink/apps/storefront')
-rw-r--r--examples/kitchen-sink/apps/storefront/.eslintrc.js4
-rw-r--r--examples/kitchen-sink/apps/storefront/next-env.d.ts5
-rw-r--r--examples/kitchen-sink/apps/storefront/next.config.js3
-rw-r--r--examples/kitchen-sink/apps/storefront/package.json28
-rw-r--r--examples/kitchen-sink/apps/storefront/public/favicon.icobin0 -> 15086 bytes
-rw-r--r--examples/kitchen-sink/apps/storefront/src/pages/_app.tsx6
-rw-r--r--examples/kitchen-sink/apps/storefront/src/pages/index.tsx24
-rw-r--r--examples/kitchen-sink/apps/storefront/src/styles.css55
-rw-r--r--examples/kitchen-sink/apps/storefront/tsconfig.json9
9 files changed, 134 insertions, 0 deletions
diff --git a/examples/kitchen-sink/apps/storefront/.eslintrc.js b/examples/kitchen-sink/apps/storefront/.eslintrc.js
new file mode 100644
index 0000000..c8df607
--- /dev/null
+++ b/examples/kitchen-sink/apps/storefront/.eslintrc.js
@@ -0,0 +1,4 @@
+module.exports = {
+ root: true,
+ extends: ["custom"],
+};
diff --git a/examples/kitchen-sink/apps/storefront/next-env.d.ts b/examples/kitchen-sink/apps/storefront/next-env.d.ts
new file mode 100644
index 0000000..4f11a03
--- /dev/null
+++ b/examples/kitchen-sink/apps/storefront/next-env.d.ts
@@ -0,0 +1,5 @@
+/// <reference types="next" />
+/// <reference types="next/image-types/global" />
+
+// NOTE: This file should not be edited
+// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/examples/kitchen-sink/apps/storefront/next.config.js b/examples/kitchen-sink/apps/storefront/next.config.js
new file mode 100644
index 0000000..da1bb77
--- /dev/null
+++ b/examples/kitchen-sink/apps/storefront/next.config.js
@@ -0,0 +1,3 @@
+module.exports = {
+ reactStrictMode: true,
+};
diff --git a/examples/kitchen-sink/apps/storefront/package.json b/examples/kitchen-sink/apps/storefront/package.json
new file mode 100644
index 0000000..08800fd
--- /dev/null
+++ b/examples/kitchen-sink/apps/storefront/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "storefront",
+ "version": "0.0.0",
+ "private": true,
+ "scripts": {
+ "build": "next build",
+ "clean": "rm -rf .next",
+ "dev": "next dev -p 3002",
+ "lint": "next lint",
+ "start": "next start "
+ },
+ "dependencies": {
+ "logger": "workspace:*",
+ "next": "latest",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "ui": "workspace:*"
+ },
+ "devDependencies": {
+ "@types/jest": "^26.0.22",
+ "@types/node": "^17.0.12",
+ "@types/react": "^17.0.13",
+ "@types/react-dom": "^17.0.8",
+ "eslint-config-custom": "workspace:*",
+ "tsconfig": "workspace:*",
+ "typescript": "^4.8.3"
+ }
+}
diff --git a/examples/kitchen-sink/apps/storefront/public/favicon.ico b/examples/kitchen-sink/apps/storefront/public/favicon.ico
new file mode 100644
index 0000000..af98450
--- /dev/null
+++ b/examples/kitchen-sink/apps/storefront/public/favicon.ico
Binary files differ
diff --git a/examples/kitchen-sink/apps/storefront/src/pages/_app.tsx b/examples/kitchen-sink/apps/storefront/src/pages/_app.tsx
new file mode 100644
index 0000000..7b312a7
--- /dev/null
+++ b/examples/kitchen-sink/apps/storefront/src/pages/_app.tsx
@@ -0,0 +1,6 @@
+import type { AppProps } from "next/app";
+import "../styles.css";
+
+export default function MyApp({ Component, pageProps }: AppProps) {
+ return <Component {...pageProps} />;
+}
diff --git a/examples/kitchen-sink/apps/storefront/src/pages/index.tsx b/examples/kitchen-sink/apps/storefront/src/pages/index.tsx
new file mode 100644
index 0000000..7adef55
--- /dev/null
+++ b/examples/kitchen-sink/apps/storefront/src/pages/index.tsx
@@ -0,0 +1,24 @@
+import { log } from "logger";
+import Head from "next/head";
+import { CounterButton, NewTabLink } from "ui";
+
+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>
+ </h1>
+ <CounterButton />
+ <p className="description">
+ Built With{" "}
+ <NewTabLink href="https://turbo.build/repo">Turborepo</NewTabLink> +{" "}
+ <NewTabLink href="https://nextjs.org/">Next.js</NewTabLink>
+ </p>
+ </div>
+ );
+}
diff --git a/examples/kitchen-sink/apps/storefront/src/styles.css b/examples/kitchen-sink/apps/storefront/src/styles.css
new file mode 100644
index 0000000..d4b766e
--- /dev/null
+++ b/examples/kitchen-sink/apps/storefront/src/styles.css
@@ -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;
+}
diff --git a/examples/kitchen-sink/apps/storefront/tsconfig.json b/examples/kitchen-sink/apps/storefront/tsconfig.json
new file mode 100644
index 0000000..fcbeaa7
--- /dev/null
+++ b/examples/kitchen-sink/apps/storefront/tsconfig.json
@@ -0,0 +1,9 @@
+{
+ "exclude": ["node_modules"],
+ "extends": "tsconfig/nextjs.json",
+ "compilerOptions": {
+ "rootDir": "src",
+ "outDir": "dist"
+ },
+ "include": ["src", "next-env.d.ts"]
+}