Skip to content

Commit

Permalink
fix: minor fixes here and there (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster committed Nov 14, 2019
1 parent 2e4bcb5 commit b8b9d65
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 50 deletions.
3 changes: 2 additions & 1 deletion templates/typescript_gapic/.jsdoc.js.njk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module.exports = {
destination: './docs/'
},
plugins: [
'plugins/markdown'
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
include: [
Expand Down
8 changes: 1 addition & 7 deletions templates/typescript_gapic/package.json.njk
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,15 @@ limitations under the License.
},
"devDependencies": {
"@types/mocha": "^5.2.5",
"@types/mv": "^2.1.0",
"@types/ncp": "^2.0.3",
"@types/node": "^12.0.0",
"@types/tmp": "^0.1.0",
"execa": "^3.2.0",
"gts": "^1.0.0",
"jsdoc": "^3.5.5",
"jsdoc-fresh": "^1.0.1",
"jsdoc-region-tag": "^1.0.2",
"linkinator": "^1.5.0",
"mocha": "^6.0.0",
"mv": "^2.1.1",
"ncp": "^2.0.0",
"pack-n-play": "^1.0.0-2",
"null-loader": "^3.0.0",
"tmp": "^0.1.0",
"ts-loader": "^6.2.1",
"typescript": "^3.7.0",
"webpack": "^4.41.2",
Expand Down
4 changes: 2 additions & 2 deletions templates/typescript_gapic/webpack.config.js.njk
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const path = require('path');
module.exports = {
entry: './src/index.ts',
output: {
library: '{{ api.naming.name.toCamelCase() }}',
filename: './{{ api.naming.name.toKebabCase() }}.js',
library: '{{ api.mainServiceName }}',
filename: './{{ api.mainServiceName.toKebabCase() }}.js',
},
node: {
child_process: 'empty',
Expand Down
2 changes: 2 additions & 0 deletions typescript/src/schema/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class API {
protos: ProtosMap;
hostName?: string;
port?: string;
mainServiceName?: string;
// oauth_scopes: plugin.google.protobuf.IServiceOptions.prototype[".google.api.oauthScopes"];
// TODO: subpackages

Expand Down Expand Up @@ -69,6 +70,7 @@ export class API {
const arr = defaultHost.split(':');
this.hostName = arr[0] || 'localhost';
this.port = arr.length > 1 ? arr[1] : '443';
this.mainServiceName = service.name || this.naming.name;
}
}
});
Expand Down
3 changes: 2 additions & 1 deletion typescript/test/testdata/keymanager/.jsdoc.js.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module.exports = {
destination: './docs/'
},
plugins: [
'plugins/markdown'
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
include: [
Expand Down
8 changes: 1 addition & 7 deletions typescript/test/testdata/keymanager/package.json.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,15 @@
},
"devDependencies": {
"@types/mocha": "^5.2.5",
"@types/mv": "^2.1.0",
"@types/ncp": "^2.0.3",
"@types/node": "^12.0.0",
"@types/tmp": "^0.1.0",
"execa": "^3.2.0",
"gts": "^1.0.0",
"jsdoc": "^3.5.5",
"jsdoc-fresh": "^1.0.1",
"jsdoc-region-tag": "^1.0.2",
"linkinator": "^1.5.0",
"mocha": "^6.0.0",
"mv": "^2.1.1",
"ncp": "^2.0.0",
"pack-n-play": "^1.0.0-2",
"null-loader": "^3.0.0",
"tmp": "^0.1.0",
"ts-loader": "^6.2.1",
"typescript": "^3.7.0",
"webpack": "^4.41.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const path = require('path');
module.exports = {
entry: './src/index.ts',
output: {
library: 'kms',
filename: './kms.js',
library: 'KeyManagementService',
filename: './key-management-service.js',
},
node: {
child_process: 'empty',
Expand Down
3 changes: 2 additions & 1 deletion typescript/test/testdata/showcase/.jsdoc.js.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module.exports = {
destination: './docs/'
},
plugins: [
'plugins/markdown'
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
include: [
Expand Down
8 changes: 1 addition & 7 deletions typescript/test/testdata/showcase/package.json.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,15 @@
},
"devDependencies": {
"@types/mocha": "^5.2.5",
"@types/mv": "^2.1.0",
"@types/ncp": "^2.0.3",
"@types/node": "^12.0.0",
"@types/tmp": "^0.1.0",
"execa": "^3.2.0",
"gts": "^1.0.0",
"jsdoc": "^3.5.5",
"jsdoc-fresh": "^1.0.1",
"jsdoc-region-tag": "^1.0.2",
"linkinator": "^1.5.0",
"mocha": "^6.0.0",
"mv": "^2.1.1",
"ncp": "^2.0.0",
"pack-n-play": "^1.0.0-2",
"null-loader": "^3.0.0",
"tmp": "^0.1.0",
"ts-loader": "^6.2.1",
"typescript": "^3.7.0",
"webpack": "^4.41.2",
Expand Down
4 changes: 2 additions & 2 deletions typescript/test/testdata/showcase/webpack.config.js.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const path = require('path');
module.exports = {
entry: './src/index.ts',
output: {
library: 'showcase',
filename: './showcase.js',
library: 'Echo',
filename: './echo.js',
},
node: {
child_process: 'empty',
Expand Down
3 changes: 2 additions & 1 deletion typescript/test/testdata/texttospeech/.jsdoc.js.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module.exports = {
destination: './docs/'
},
plugins: [
'plugins/markdown'
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
include: [
Expand Down
8 changes: 1 addition & 7 deletions typescript/test/testdata/texttospeech/package.json.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,15 @@
},
"devDependencies": {
"@types/mocha": "^5.2.5",
"@types/mv": "^2.1.0",
"@types/ncp": "^2.0.3",
"@types/node": "^12.0.0",
"@types/tmp": "^0.1.0",
"execa": "^3.2.0",
"gts": "^1.0.0",
"jsdoc": "^3.5.5",
"jsdoc-fresh": "^1.0.1",
"jsdoc-region-tag": "^1.0.2",
"linkinator": "^1.5.0",
"mocha": "^6.0.0",
"mv": "^2.1.1",
"ncp": "^2.0.0",
"pack-n-play": "^1.0.0-2",
"null-loader": "^3.0.0",
"tmp": "^0.1.0",
"ts-loader": "^6.2.1",
"typescript": "^3.7.0",
"webpack": "^4.41.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const path = require('path');
module.exports = {
entry: './src/index.ts',
output: {
library: 'texttospeech',
filename: './texttospeech.js',
library: 'TextToSpeech',
filename: './text-to-speech.js',
},
node: {
child_process: 'empty',
Expand Down
3 changes: 2 additions & 1 deletion typescript/test/testdata/translate/.jsdoc.js.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module.exports = {
destination: './docs/'
},
plugins: [
'plugins/markdown'
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
include: [
Expand Down
8 changes: 1 addition & 7 deletions typescript/test/testdata/translate/package.json.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,15 @@
},
"devDependencies": {
"@types/mocha": "^5.2.5",
"@types/mv": "^2.1.0",
"@types/ncp": "^2.0.3",
"@types/node": "^12.0.0",
"@types/tmp": "^0.1.0",
"execa": "^3.2.0",
"gts": "^1.0.0",
"jsdoc": "^3.5.5",
"jsdoc-fresh": "^1.0.1",
"jsdoc-region-tag": "^1.0.2",
"linkinator": "^1.5.0",
"mocha": "^6.0.0",
"mv": "^2.1.1",
"ncp": "^2.0.0",
"pack-n-play": "^1.0.0-2",
"null-loader": "^3.0.0",
"tmp": "^0.1.0",
"ts-loader": "^6.2.1",
"typescript": "^3.7.0",
"webpack": "^4.41.2",
Expand Down
4 changes: 2 additions & 2 deletions typescript/test/testdata/translate/webpack.config.js.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const path = require('path');
module.exports = {
entry: './src/index.ts',
output: {
library: 'translation',
filename: './translation.js',
library: 'TranslationService',
filename: './translation-service.js',
},
node: {
child_process: 'empty',
Expand Down

0 comments on commit b8b9d65

Please sign in to comment.