mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
cleanup
This commit is contained in:
31
bin/build/data.ts
Normal file
31
bin/build/data.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
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 };
|
||||
Reference in New Issue
Block a user