-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b752a53
commit b7e0932
Showing
83 changed files
with
1,907 additions
and
1,904 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends": ["next/core-web-vitals", "plugin:jest-dom/recommended"] | ||
"extends": ["next/core-web-vitals", "plugin:jest-dom/recommended", "prettier"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ jobs: | |
with: | ||
node-version: 18 | ||
- run: npm i | ||
- run: npm run test | ||
- run: npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Ignore artifacts: | ||
build | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
import { defineDocumentType, makeSource } from 'contentlayer/source-files' | ||
import rehypePrettyCode, { Options } from 'rehype-pretty-code' | ||
import { defineDocumentType, makeSource } from "contentlayer/source-files"; | ||
import rehypePrettyCode, { Options } from "rehype-pretty-code"; | ||
|
||
export const Post = defineDocumentType(() => ({ | ||
name: 'Post', | ||
name: "Post", | ||
filePathPattern: `**/*.mdx`, | ||
contentType: 'mdx', | ||
contentType: "mdx", | ||
fields: { | ||
title: { type: 'string', required: true }, | ||
publishedAt: { type: 'date', required: true }, | ||
description: { type: 'string', required: true }, | ||
title: { type: "string", required: true }, | ||
publishedAt: { type: "date", required: true }, | ||
description: { type: "string", required: true }, | ||
}, | ||
computedFields: { | ||
url: { | ||
type: 'string', | ||
resolve: post => post._raw.flattenedPath, | ||
type: "string", | ||
resolve: (post) => post._raw.flattenedPath, | ||
}, | ||
image: { | ||
type: 'string', | ||
resolve: post => `/images/${post._raw.flattenedPath}/cover.webp`, | ||
type: "string", | ||
resolve: (post) => `/images/${post._raw.flattenedPath}/cover.webp`, | ||
}, | ||
slug: { | ||
type: 'string', | ||
resolve: post => post._raw.sourceFileName.replace(/\.mdx$/, ''), | ||
type: "string", | ||
resolve: (post) => post._raw.sourceFileName.replace(/\.mdx$/, ""), | ||
}, | ||
}, | ||
})) | ||
})); | ||
|
||
export const Experience = defineDocumentType(() => ({ | ||
name: 'Experience', | ||
name: "Experience", | ||
filePathPattern: `**/*.mdx`, | ||
contentType: 'mdx', | ||
contentType: "mdx", | ||
fields: { | ||
title: { type: 'string', required: true }, | ||
company: { type: 'string', required: true }, | ||
employmentType: { type: 'string', required: true }, | ||
startDate: { type: 'date', required: true }, | ||
endDate: { type: 'date' }, | ||
skills: { type: 'list', required: true, of: { type: 'string' } }, | ||
title: { type: "string", required: true }, | ||
company: { type: "string", required: true }, | ||
employmentType: { type: "string", required: true }, | ||
startDate: { type: "date", required: true }, | ||
endDate: { type: "date" }, | ||
skills: { type: "list", required: true, of: { type: "string" } }, | ||
}, | ||
})) | ||
})); | ||
|
||
const rehypePrettyCodeOptions: Options = { | ||
theme: 'dracula', | ||
theme: "dracula", | ||
keepBackground: false, | ||
} | ||
}; | ||
|
||
export default makeSource({ | ||
contentDirPath: './src/data', | ||
contentDirPath: "./src/data", | ||
documentTypes: [Post, Experience], | ||
mdx: { | ||
rehypePlugins: [[rehypePrettyCode, rehypePrettyCodeOptions]], | ||
}, | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
import nextJest from 'next/jest.js' | ||
import nextJest from "next/jest.js"; | ||
|
||
const createJestConfig = nextJest({ | ||
dir: './', | ||
}) | ||
dir: "./", | ||
}); | ||
|
||
const commonTestConfig = { | ||
setupFilesAfterEnv: ['<rootDir>/src/config/jest.setup.ts'], | ||
setupFilesAfterEnv: ["<rootDir>/src/config/jest.setup.ts"], | ||
moduleNameMapper: { | ||
'^~/(.*)$': '<rootDir>/src/$1', | ||
"^~/(.*)$": "<rootDir>/src/$1", | ||
}, | ||
} | ||
}; | ||
|
||
const clientTestConfig = { | ||
...commonTestConfig, | ||
displayName: 'client', | ||
testEnvironment: 'jest-environment-jsdom', | ||
testMatch: ['**/__tests__/client/*.[jt]s?(x)', '**/__tests__/*.[jt]s?(x)'], | ||
} | ||
displayName: "client", | ||
testEnvironment: "jest-environment-jsdom", | ||
testMatch: ["**/__tests__/client/*.[jt]s?(x)", "**/__tests__/*.[jt]s?(x)"], | ||
}; | ||
|
||
const serverTestConfig = { | ||
...commonTestConfig, | ||
displayName: 'server', | ||
testEnvironment: 'node', | ||
testMatch: ['**/__tests__/server/*.[jt]s?(x)'], | ||
} | ||
displayName: "server", | ||
testEnvironment: "node", | ||
testMatch: ["**/__tests__/server/*.[jt]s?(x)"], | ||
}; | ||
|
||
/** @type {import('jest').Config} */ | ||
const config = { | ||
projects: [ | ||
await createJestConfig(clientTestConfig)(), | ||
await createJestConfig(serverTestConfig)(), | ||
], | ||
} | ||
}; | ||
|
||
export default config | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
const { withContentlayer } = require('next-contentlayer') | ||
const { withContentlayer } = require("next-contentlayer"); | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
images: { | ||
// Follows TailwindCSS screens breakpoints | ||
deviceSizes: [640, 768, 1024, 1280, 1536], | ||
}, | ||
} | ||
}; | ||
|
||
module.exports = withContentlayer(nextConfig) | ||
module.exports = withContentlayer(nextConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
plugins: { | ||
'tailwindcss/nesting': {}, | ||
"tailwindcss/nesting": {}, | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import { Metadata } from 'next' | ||
import { ExperienceCard } from '~/components/experience-card' | ||
import { Metadata } from "next"; | ||
import { ExperienceCard } from "~/components/experience-card"; | ||
|
||
import { experiences } from '~/content/experiences' | ||
import { experiences } from "~/content/experiences"; | ||
|
||
export const metadata: Metadata = { | ||
title: 'Experience', | ||
} | ||
title: "Experience", | ||
}; | ||
|
||
export default function ExperiencesPage() { | ||
return ( | ||
<div className='flex flex-col gap-8'> | ||
<h1 className='font-bold text-4xl sm:text-5xl mb-2 sm:mb-5'> | ||
<div className="flex flex-col gap-8"> | ||
<h1 className="font-bold text-4xl sm:text-5xl mb-2 sm:mb-5"> | ||
Experience | ||
</h1> | ||
{experiences.map(experience => ( | ||
{experiences.map((experience) => ( | ||
<ExperienceCard | ||
{...experience} | ||
key={experience.title} | ||
description={experience.body} | ||
/> | ||
))} | ||
</div> | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.