Skip to content

Commit

Permalink
Add path option
Browse files Browse the repository at this point in the history
  • Loading branch information
ganemone authored and generic-probot-app-workflow[bot] committed Dec 21, 2018
1 parent 978d15d commit d64d3c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ const argv = yargs
describe: 'appended to generated type names',
default: 'Type',
})
.option('path', {
describe: 'Path used for generated code',
})
.option('withsource', {
describe: 'prepend the source path of the thrift file',
default: false,
Expand Down Expand Up @@ -72,7 +75,7 @@ for (const thriftPath of thriftPaths) {
allOutput[converter.thriftPath] = converter.generateFlowFile();
}

const root = commonPathPrefix(Object.keys(allOutput));
const root = argv.path || commonPathPrefix(Object.keys(allOutput));

for (const thriftPath in allOutput) {
const relativeThriftPath = path.dirname(path.relative(root, thriftPath));
Expand Down

0 comments on commit d64d3c9

Please sign in to comment.