Skip to content

Commit

Permalink
feat(bindgen): Add --repository flag
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Jan 18, 2023
1 parent 84de1cd commit ada116b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/itk-wasm-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,10 @@ function typescriptBindings(outputDir, buildDir, wasmBinaries, options, forNode=
packageJson.exports['.'].browser = `./dist/${packageName}.js`
packageJson.exports['.'].node = `./dist/${packageName}.node.js`
packageJson.exports['.'].default = `./dist/${packageName}.js`
if(options.repository) {
packageJson.repository = { 'type': 'git', 'url': options.repository }
}
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2))

}

if (!forNode) {
Expand Down Expand Up @@ -744,6 +746,7 @@ program
.requiredOption('-p, --package-name <package-name>', 'Output a package configuration files with the given packages name')
.requiredOption('-d, --package-description <package-description>', 'Description for package')
.addOption(new Option('-l, --language <language>', 'language to generate bindings for, defaults to "typescript"').choices(['typescript',]))
.option('-r, --repository <repository-url>', 'Source code repository URL')
.usage('[options] [wasmBinaries...]')
.description('Generate WASM module bindings for a language')
.action(bindgen)
Expand Down

0 comments on commit ada116b

Please sign in to comment.