Skip to content

Commit

Permalink
Only generate files in fileToGenerate
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil Sahlén committed Apr 23, 2021
1 parent 7417229 commit eae93e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integration/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function generate(binFile: string, baseDir: string, parameter: string) {
const options = optionsFromParameter(parameter || '');
const typeMap = createTypeMap(request, options);

for (let file of request.protoFile) {
for (let file of request.fileToGenerate) {
// Make a different utils per file to track per-file usage
const utils = makeUtils(options);
const ctx: Context = { options, typeMap, utils };
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function main() {
const ctx: Context = { typeMap, options, utils };

const files = await Promise.all(
request.protoFile.map(async (file) => {
request.fileToGenerate.map(async (file) => {
const [path, code] = generateFile(ctx, file);
const spec = await code.toStringWithImports({ ...getTsPoetOpts(options), path });
return { name: path, content: prefixDisableLinter(spec) };
Expand Down

0 comments on commit eae93e4

Please sign in to comment.