diff --git a/.env.example b/.env.example deleted file mode 100644 index f854caab..00000000 --- a/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY= -CLERK_SECRET_KEY= -DATABASE_HOST= -DATABASE_USERNAME= -DATABASE_PASSWORD= diff --git a/.gitignore b/.gitignore index 96299837..8b45e1e3 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,6 @@ next-env.d.ts # vs code .vscode + +# turbo +.turbo diff --git a/app/(home)/Resume.tsx b/app/(home)/Resume.tsx index e7095baf..e993fc66 100644 --- a/app/(home)/Resume.tsx +++ b/app/(home)/Resume.tsx @@ -1,26 +1,19 @@ import Image, { type StaticImageData } from 'next/image' import React from 'react' import { TbBriefcase } from 'react-icons/tb' -import { z } from 'zod' import eightNinthsLogo from '~/assets/company/8ninths.jpeg' import abletiveLogo from '~/assets/company/abletive.png' import vvsLogo from '~/assets/company/vvs.png' import zolplayLogo from '~/assets/company/zolplay.png' -const resumeSchema = z.object({ - company: z.string(), - title: z.string(), - start: z.union([ - z.string(), - z.object({ label: z.string(), dateTime: z.number() }), - ]), - end: z.union([ - z.string(), - z.object({ label: z.string(), dateTime: z.number() }), - ]), -}) -type Resume = z.infer & { logo: StaticImageData } +type Resume = { + company: string + title: string + start: string | { label: string; dateTime: number } + end: string | { label: string; dateTime: number } + logo: StaticImageData +} const resume: Resume[] = [ { company: '深圳市佐玩信息技术有限公司', diff --git a/components/layouts/Footer.tsx b/components/layouts/Footer.tsx index 75d7e625..b8e2d990 100644 --- a/components/layouts/Footer.tsx +++ b/components/layouts/Footer.tsx @@ -43,7 +43,7 @@ function formatNumber(n: number, inChinese = false): string { } else if (Math.abs(n) >= 10000) { return (n / 10000).toFixed(1) + '万' } else { - return new Intl.NumberFormat('en-US').format(n) + return Intl.NumberFormat('en-US').format(n) } } @@ -52,7 +52,7 @@ function formatNumber(n: number, inChinese = false): string { } else if (Math.abs(n) >= 1000) { return (n / 1000).toFixed(1) + 'k' } else { - return new Intl.NumberFormat('en-US').format(n) + return Intl.NumberFormat('en-US').format(n) } } @@ -61,7 +61,7 @@ async function TotalPageViews() { if (env.VERCEL_ENV === 'production') { views = await kv.incr('total_page_views') } else { - views = (await kv.get('total_page_views')) ?? 0 + views = 345678 } return ( diff --git a/package.json b/package.json index f0cb04b7..71d3bfa1 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "prettier-plugin-packagejson": "^2.4.3", "prettier-plugin-tailwindcss": "^0.2.8", "tailwindcss": "^3.3.2", + "turbo": "^1.9.3", "typescript": "^5.0.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f4eb35c3..ae20121f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -147,6 +147,9 @@ devDependencies: tailwindcss: specifier: ^3.3.2 version: 3.3.2 + turbo: + specifier: ^1.9.3 + version: 1.9.3 typescript: specifier: ^5.0.4 version: 5.0.4 @@ -5187,6 +5190,67 @@ packages: tslib: 1.14.1 typescript: 5.0.4 + /turbo-darwin-64@1.9.3: + resolution: {integrity: sha512-0dFc2cWXl82kRE4Z+QqPHhbEFEpUZho1msHXHWbz5+PqLxn8FY0lEVOHkq5tgKNNEd5KnGyj33gC/bHhpZOk5g==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /turbo-darwin-arm64@1.9.3: + resolution: {integrity: sha512-1cYbjqLBA2zYE1nbf/qVnEkrHa4PkJJbLo7hnuMuGM0bPzh4+AnTNe98gELhqI1mkTWBu/XAEeF5u6dgz0jLNA==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /turbo-linux-64@1.9.3: + resolution: {integrity: sha512-UuBPFefawEwpuxh5pM9Jqq3q4C8M0vYxVYlB3qea/nHQ80pxYq7ZcaLGEpb10SGnr3oMUUs1zZvkXWDNKCJb8Q==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /turbo-linux-arm64@1.9.3: + resolution: {integrity: sha512-vUrNGa3hyDtRh9W0MkO+l1dzP8Co2gKnOVmlJQW0hdpOlWlIh22nHNGGlICg+xFa2f9j4PbQlWTsc22c019s8Q==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /turbo-windows-64@1.9.3: + resolution: {integrity: sha512-0BZ7YaHs6r+K4ksqWus1GKK3W45DuDqlmfjm/yuUbTEVc8szmMCs12vugU2Zi5GdrdJSYfoKfEJ/PeegSLIQGQ==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /turbo-windows-arm64@1.9.3: + resolution: {integrity: sha512-QJUYLSsxdXOsR1TquiOmLdAgtYcQ/RuSRpScGvnZb1hY0oLc7JWU0llkYB81wVtWs469y8H9O0cxbKwCZGR4RQ==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /turbo@1.9.3: + resolution: {integrity: sha512-ID7mxmaLUPKG/hVkp+h0VuucB1U99RPCJD9cEuSEOdIPoSIuomcIClEJtKamUsdPLhLCud+BvapBNnhgh58Nzw==} + hasBin: true + requiresBuild: true + optionalDependencies: + turbo-darwin-64: 1.9.3 + turbo-darwin-arm64: 1.9.3 + turbo-linux-64: 1.9.3 + turbo-linux-arm64: 1.9.3 + turbo-windows-64: 1.9.3 + turbo-windows-arm64: 1.9.3 + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} diff --git a/turbo.json b/turbo.json new file mode 100644 index 00000000..3b9dda33 --- /dev/null +++ b/turbo.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://turbo.build/schema.json", + "pipeline": { + "build": { + "outputs": [".next/**", "!.next/cache/**"] + }, + "lint": {} + } +} diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..09e0182a --- /dev/null +++ b/vercel.json @@ -0,0 +1,4 @@ +{ + "buildCommand": "pnpm turbo build", + "ignoreCommand": "pnpm dlx turbo-ignore" +}