Skip to content

Commit

Permalink
feat: add turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
CaliCastle committed May 2, 2023
1 parent f5accb0 commit 7021a15
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 22 deletions.
5 changes: 0 additions & 5 deletions .env.example

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ next-env.d.ts

# vs code
.vscode

# turbo
.turbo
21 changes: 7 additions & 14 deletions app/(home)/Resume.tsx
Original file line number Diff line number Diff line change
@@ -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<typeof resumeSchema> & { 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: '深圳市佐玩信息技术有限公司',
Expand Down
6 changes: 3 additions & 3 deletions components/layouts/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand All @@ -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)
}
}

Expand All @@ -61,7 +61,7 @@ async function TotalPageViews() {
if (env.VERCEL_ENV === 'production') {
views = await kv.incr('total_page_views')
} else {
views = (await kv.get<number>('total_page_views')) ?? 0
views = 345678
}

return (
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
64 changes: 64 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"outputs": [".next/**", "!.next/cache/**"]
},
"lint": {}
}
}
4 changes: 4 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"buildCommand": "pnpm turbo build",
"ignoreCommand": "pnpm dlx turbo-ignore"
}

0 comments on commit 7021a15

Please sign in to comment.