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

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 };