Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

feat!: move library to typescript code generation #285

Merged
merged 26 commits into from
Nov 14, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'src'
'build/src'
],
includePattern: '\\.js$'
},
Expand Down
28 changes: 18 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"node": ">=8.10.0"
},
"repository": "googleapis/nodejs-text-to-speech",
"main": "src/index.js",
"main": "build/src/index.js",
"files": [
"protos",
"src"
"build/protos",
"build/src"
],
"keywords": [
"google apis client",
Expand All @@ -27,14 +27,18 @@
"Cloud Text-to-Speech API"
],
"scripts": {
"test": "nyc mocha",
"lint": "eslint '**/*.js'",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"test": "mocha build/test",
xiaozhenliu-gg5 marked this conversation as resolved.
Show resolved Hide resolved
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
"system-test": "mocha system-test",
"docs": "jsdoc -c .jsdoc.js",
"fix": "eslint --fix '**/*.js'",
"fix": "gts fix && eslint --fix samples system-test",
"docs-test": "linkinator docs",
"predocs-test": "npm run docs"
"predocs-test": "npm run docs",
"lint": "gts check",
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/",
"compile-protos": "compileProtos src",
"prepare": "npm run compile"
},
"dependencies": {
"google-gax": "^1.7.5"
Expand All @@ -48,10 +52,14 @@
"jsdoc-fresh": "^1.0.1",
"intelli-espower-loader": "^1.0.1",
"jsdoc": "^3.5.5",
"mocha": "^6.0.0",
"mocha": "^6.1.4",
"nyc": "^14.0.0",
"power-assert": "^1.4.4",
"prettier": "^1.11.1",
"linkinator": "^1.5.0"
"linkinator": "^1.5.0",
"@types/node": "^12.0.0",
"@types/mocha": "^5.2.5",
"gts": "^1.0.0",
"typescript": "~3.6.0"
xiaozhenliu-gg5 marked this conversation as resolved.
Show resolved Hide resolved
}
}
87 changes: 0 additions & 87 deletions src/index.js

This file was deleted.

26 changes: 26 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

const gapic = Object.freeze({
v1beta1: require('./v1beta1'),
alexander-fenster marked this conversation as resolved.
Show resolved Hide resolved
v1: require('./v1'),
});
module.exports = gapic.v1;
alexander-fenster marked this conversation as resolved.
Show resolved Hide resolved
module.exports.v1beta1 = gapic.v1beta1;
module.exports.v1 = gapic.v1;
module.exports.default = Object.assign({}, module.exports);
10 changes: 5 additions & 5 deletions src/v1/index.js → src/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

'use strict';

const TextToSpeechClient = require('./text_to_speech_client');

module.exports.TextToSpeechClient = TextToSpeechClient;
export {TextToSpeechClient} from './text_to_speech_client';
Loading