Skip to content

Commit

Permalink
Use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
mellevanderlinde committed Nov 1, 2024
1 parent 8334539 commit 8ccc95c
Show file tree
Hide file tree
Showing 27 changed files with 6,966 additions and 11,097 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:

- name: Build
run: |
npm ci
npm run lint
npm run build
npm run test
npm install -g pnpm
pnpm install
pnpm lint
pnpm build
pnpm test
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This repository contains my portfolio, served with Amazon CloudFront and S3 on [
To install the project's dependencies, build the website and deploy to AWS, run the following:

```
npm ci
npm run build
pnpm install
pnpm build
cd apps/infra
npx cdk deploy -c accountId=012345678912
```
2 changes: 1 addition & 1 deletion apps/infra/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from "@repo/eslint-config/eslint.config.mjs";
import config from "eslint-config/eslint.config.mjs";

export default [
...config,
Expand Down
4 changes: 2 additions & 2 deletions apps/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test:update": "jest -u"
},
"devDependencies": {
"@repo/eslint-config": "*",
"eslint-config": "workspace:*",
"@types/jest": "^29.5.11",
"@types/node": "^22.5.0",
"aws-cdk": "^2.122.0",
Expand All @@ -22,7 +22,7 @@
"typescript": "~5.6.2"
},
"dependencies": {
"@repo/website": "*",
"website": "workspace:*",
"aws-cdk-lib": "^2.122.0",
"constructs": "^10.0.0",
"source-map-support": "^0.5.21"
Expand Down
2 changes: 1 addition & 1 deletion apps/infra/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"typeRoots": [
"./../../node_modules/@types"
"./node_modules/@types"
]
},
"exclude": [
Expand Down
12 changes: 6 additions & 6 deletions apps/website/__tests__/components.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { render } from "@testing-library/react";
import { Header1 } from "@repo/website/app/components/header";
import { Navbar } from "@repo/website/app/components/nav";
import { getBlogPosts } from "@repo/website/app/lib/posts";
import Footer from "@repo/website/app/components/footer";
import robots from "@repo/website/app/robots";
import sitemap from "@repo/website/app/sitemap";
import { Header1 } from "@app/components/header";
import { Navbar } from "@app/components/nav";
import { getBlogPosts } from "@app/lib/posts";
import Footer from "@app/components/footer";
import robots from "@app/robots";
import sitemap from "@app/sitemap";

test("Match footer", () => {
const { container } = render(<Footer />);
Expand Down
10 changes: 5 additions & 5 deletions apps/website/__tests__/pages.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { render } from "@testing-library/react";
import Home from "@repo/website/app/page";
import Projects from "@repo/website/app/projects/page";
import Work from "@repo/website/app/work/page";
import Blog from "@repo/website/app/blog/page";
import NotFound from "@repo/website/app/not-found";
import Home from "@app/page";
import Projects from "@app/projects/page";
import Work from "@app/work/page";
import Blog from "@app/blog/page";
import NotFound from "@app/not-found";

test("Match home", () => {
const { container } = render(<Home />);
Expand Down
4 changes: 2 additions & 2 deletions apps/website/app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { notFound } from "next/navigation";
import { CustomMDX } from "@repo/website/app/components/mdx";
import { CustomMDX } from "app/components/mdx";
import { formatDate, getBlogPosts } from "app/lib/posts";
import { Metadata } from "next";
import { ReactNode } from "react";
import { getReadingTime } from "@repo/reading-time";
import { getReadingTime } from "reading-time";

export function generateMetadata({ params }): Metadata {
const post = getBlogPosts().find((post) => post.slug === params.slug);
Expand Down
2 changes: 1 addition & 1 deletion apps/website/app/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Link from "next/link";
import { Metadata } from "next";
import { ReactNode } from "react";
import { formatDate, getBlogPosts } from "../lib/posts";
import { Header1 } from "@repo/website/app/components/header";
import { Header1 } from "@app/components/header";

export const metadata: Metadata = {
title: "Blog",
Expand Down
4 changes: 2 additions & 2 deletions apps/website/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import "./global.css";
import type { Metadata } from "next";
import { GeistSans } from "geist/font/sans";
import { GeistMono } from "geist/font/mono";
import { Navbar } from "./components/nav";
import { Navbar } from "@components/nav";
import { ReactNode } from "react";
import Footer from "./components/footer";
import Footer from "@components/footer";
import { baseUrl } from "./sitemap";

export const metadata: Metadata = {
Expand Down
2 changes: 1 addition & 1 deletion apps/website/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode } from "react";
import { Metadata } from "next";
import { Header1 } from "./components/header";
import { Header1 } from "@components/header";

const title = "404 - Page not found";

Expand Down
2 changes: 1 addition & 1 deletion apps/website/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ReactNode } from "react";
import { Header1 } from "./components/header";
import { Header1 } from "@components/header";

export default function Page(): ReactNode {
return (
Expand Down
2 changes: 1 addition & 1 deletion apps/website/app/projects/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Metadata } from "next";
import { ReactNode } from "react";
import { projects } from "./project-data";
import { Header1 } from "@repo/website/app/components/header";
import { Header1 } from "app/components/header";

export const metadata: Metadata = {
title: "Projects",
Expand Down
2 changes: 1 addition & 1 deletion apps/website/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { navItems } from "./components/nav";
import { navItems } from "@components/nav";
import type { MetadataRoute } from "next";
import { getBlogPosts } from "./lib/posts";

Expand Down
2 changes: 1 addition & 1 deletion apps/website/app/work/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Metadata } from "next";
import { Header1 } from "../components/header";
import { Header1 } from "@components/header";
import { ReactNode } from "react";
import { jobs } from "./work-data";

Expand Down
2 changes: 1 addition & 1 deletion apps/website/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from "@repo/eslint-config/eslint.config.mjs";
import config from "eslint-config/eslint.config.mjs";

export default [
...config,
Expand Down
4 changes: 3 additions & 1 deletion apps/website/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { Config } from "jest";
import nextJest from "next/jest";

const createJestConfig = nextJest();
const createJestConfig = nextJest({
dir: "./",
});

const config: Config = {
testEnvironment: "jsdom",
Expand Down
6 changes: 3 additions & 3 deletions apps/website/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@repo/website",
"name": "website",
"private": true,
"scripts": {
"build": "next build",
Expand All @@ -10,7 +10,7 @@
"test:update": "jest -u"
},
"dependencies": {
"@repo/reading-time": "*",
"reading-time": "workspace:*",
"@types/node": "^22.5.0",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
Expand All @@ -25,7 +25,7 @@
"typescript": "~5.6.2"
},
"devDependencies": {
"@repo/eslint-config": "*",
"eslint-config": "workspace:*",
"@tailwindcss/typography": "^0.5.15",
"@testing-library/react": "^16.0.1",
"@types/jest": "^29.5.14",
Expand Down
6 changes: 5 additions & 1 deletion apps/website/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
"name": "next"
}
],
"strictNullChecks": true
"strictNullChecks": true,
"paths": {
"@app/*": ["app/*"],
"@components/*": ["app/components/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
Expand Down
Loading

0 comments on commit 8ccc95c

Please sign in to comment.