feat: init

This commit is contained in:
Morten Olsen
2022-12-06 09:12:53 +01:00
commit 3f5e941446
115 changed files with 13148 additions and 0 deletions

5
profile/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
/node_modules/
/*.logs
/.yarn/
/dist/

4
profile/package.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "@morten-olsen/personal-webpage-profile",
"main": "./dist/index.js"
}

View File

@@ -0,0 +1,7 @@
---
company: ZeroNorth
title: Senior Software Engineer
start: 2021-01-01
---
Hello World

View File

@@ -0,0 +1 @@
export * from './positions';

View File

@@ -0,0 +1,14 @@
import { Position } from "../types/positions";
const context = (require as any).context('../../positions', true, /\.md$/)
const getPositions = () => context.keys().map((key: string) => context(key)).map((a: any) => ({
...a,
attributes: {
...a.attributes,
start: a.attributes.start ? new Date(a.attributes.start).getTime() : null,
end: a.attributes.end ? new Date(a.attributes.end).getTime() : null,
},
})) as Position[];
export { getPositions };

2
profile/src/index.ts Normal file
View File

@@ -0,0 +1,2 @@
export * from './data';
export * from './types';

View File

@@ -0,0 +1 @@
export * from './positions';

View File

@@ -0,0 +1,11 @@
type Position = {
body: string;
attributes: {
start: number;
end?: number;
company: string;
title: string;
};
};
export type { Position };

9
profile/tsconfig.json Normal file
View File

@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "./dist"
},
"include": [
"./src"
]
}