Skip to content

Commit

Permalink
chore(stats): add collections to stats
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Feb 10, 2018
1 parent 1fb9e89 commit 0a4ddb4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/compiler/build/build-results.ts
Expand Up @@ -139,7 +139,16 @@ export async function generateBuildStats(config: Config, compilerCtx: CompilerCt
buildEs5: config.buildEs5
},
components: buildResults.components,
entries: buildResults.entries
entries: buildResults.entries,
collections: config.collections.map(c => {
return {
name: c.name
};
}).sort((a, b) => {
if (a.name < b.name) return -1;
if (a.name > b.name) return 1;
return 0;
})
};

jsonData = stats;
Expand Down
3 changes: 3 additions & 0 deletions src/declarations/build.ts
Expand Up @@ -78,6 +78,9 @@ export interface BuildStats {
};
components: BuildComponent[];
entries: BuildEntry[];
collections: {
name: string;
}[];
}


Expand Down

0 comments on commit 0a4ddb4

Please sign in to comment.