Skip to content

Commit

Permalink
fix(core): createDump now takes an optional entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
manfredsteyer authored and rainerhahnekamp committed Aug 29, 2024
1 parent 3b4cfef commit e3e3f43
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/core/src/lib/cli/export-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ function calcOrGetTags(modulePath: FsPath, projectInfo: ProjectInfo): string[] {
return tags;
}

export function createDump(projectInfo: ProjectInfo) {
export function createDump(entry?: string) {
const fs = getFs();
const projectInfo = getEntryFromCliOrConfig(entry);
const relative = (path: FsPath) => fs.relativeTo(projectInfo.rootDir, path);

const data: Record<string, ExportEntry> = {};
Expand All @@ -48,9 +49,6 @@ export function createDump(projectInfo: ProjectInfo) {
}

export function exportData(...args: string[]): void {
const projectInfo = getEntryFromCliOrConfig(args[0]);

const data: Record<string, ExportEntry> = createDump(projectInfo);

const data: Record<string, ExportEntry> = createDump(args[0]);
cli.log(JSON.stringify(data, null, ' '));
}
}

0 comments on commit e3e3f43

Please sign in to comment.