Skip to content

Commit 0a74544

Browse files
committed
feat(generator): update package.json template for monorepo compatibility
1 parent 292c688 commit 0a74544

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

core/generator/gapic-generator-typescript/templates/cjs/typescript_gapic/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22
"name": "{{ api.publishName }}",
33
"version": "0.1.0",
44
"description": "{{ api.naming.productName }} client for Node.js",
5+
{%- if '/' in api.publishName -%}
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/googleapis/google-cloud-node.git",
9+
"directory": "packages/{{ api.publishName | replace('@', '') | replace('/', '-') }}"
10+
},
11+
"homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/{{ api.publishName | replace('@', '') | replace('/', '-') }}",
12+
{%- else -%}
513
"repository": "googleapis/nodejs-{{ api.naming.productName.toKebabCase() }}",
14+
{%- endif -%}
615
"license": "Apache-2.0",
716
"author": "Google LLC",
817
"main": "build/src/index.js",

core/generator/gapic-generator-typescript/templates/esm/typescript_gapic/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22
"name": "{{ api.publishName }}",
33
"version": "0.1.0",
44
"description": "{{ api.naming.productName }} client for Node.js",
5+
{%- if '/' in api.publishName -%}
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/googleapis/google-cloud-node.git",
9+
"directory": "packages/{{ api.publishName | replace('@', '') | replace('/', '-') }}"
10+
},
11+
"homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/{{ api.publishName | replace('@', '') | replace('/', '-') }}",
12+
{%- else -%}
513
"repository": "googleapis/nodejs-{{ api.naming.productName.toKebabCase() }}",
14+
{%- endif -%}
615
"license": "Apache-2.0",
716
"author": "Google LLC",
817
"main": "./build/cjs/src/index.cjs",

0 commit comments

Comments
 (0)