mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
32 lines
687 B
TypeScript
32 lines
687 B
TypeScript
import { Config } from '../../types/config';
|
|
import { Bundler } from '../bundler';
|
|
import { createArticles } from '../data/articles';
|
|
import { createPositions } from '../data/positions';
|
|
import { createProfile } from '../data/profile';
|
|
|
|
type GetDataOptions = {
|
|
cwd: string;
|
|
config: Config;
|
|
bundler: Bundler;
|
|
};
|
|
|
|
const getData = ({ cwd, config, bundler }: GetDataOptions) => ({
|
|
articles: createArticles({
|
|
cwd,
|
|
pattern: config.articles.pattern,
|
|
bundler,
|
|
}),
|
|
positions: createPositions({
|
|
cwd,
|
|
pattern: config.positions.pattern,
|
|
bundler,
|
|
}),
|
|
profile: createProfile({
|
|
cwd,
|
|
path: config.profile.path,
|
|
bundler,
|
|
}),
|
|
});
|
|
|
|
export { getData };
|