From a0be097c341caa7815bc24b751a8fad4773ee76a Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Mon, 8 Jul 2024 02:31:23 +0200 Subject: [PATCH] feat(build): export project type from manifest --- build/manifestPlugin.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/manifestPlugin.ts b/build/manifestPlugin.ts index fab125d..a4bc475 100644 --- a/build/manifestPlugin.ts +++ b/build/manifestPlugin.ts @@ -65,9 +65,11 @@ export const manifest = (): Plugin => ({ } const code = ` - const projects = ${JSON.stringify(projects, null, 2)}; + const projects = ${JSON.stringify(projects, null, 2)} as const; - const projectsMap = Object.fromEntries(projects.map(project => [project.name, project])); + export type Project = typeof projects[number]; + + const projectsMap = Object.fromEntries(projects.map(project => [project.name, project])) as const; export const manifest = { projects,