Skip to content

Commit 257816b

Browse files
authored
move typescript files into separate ts/ dir (googleapis#144)
It seems that tslint wasn't being run on the test files. This commit also fixes that.
1 parent 2582bee commit 257816b

35 files changed

+88
-80
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
node_modules/*
2-
build/
2+
lib/
3+
test/
4+
types/
35
.idea
46
.vscode
57
docs/
68
npm-debug.log
79
coverage
8-
lib/**/*.js
9-
test/**/*.js
1010
*.js.map

gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const ts = require('gulp-typescript');
1313
const tslint = require('gulp-tslint');
1414

1515
const outDir = 'build';
16-
const sources = ['src/**/*.ts'];
17-
const tests = ['test/**/*.ts'];
16+
const sources = ['ts/lib/**/*.ts'];
17+
const tests = ['ts/test/**/*.ts'];
1818
const allFiles = ['*.js'].concat(sources, tests);
1919

2020
let exitOnError = true;

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@
5151
"typescript": "^2.2.2"
5252
},
5353
"scripts": {
54-
"lint": "tslint -c tslint.json lib/**/*.ts test/**/*.ts",
54+
"lint": "tslint -c tslint.json ts/**/*.ts",
5555
"mocha": "mocha --reporter spec --timeout 4000 --require source-map-support/register",
56-
"generate-docs": "typedoc --name 'Google Node.js OAuth 2.0 Client' --out docs --readme README.md --exclude 'test/**'",
56+
"generate-docs": "typedoc --name 'Google Node.js OAuth 2.0 Client' --out docs --readme README.md ts/lib",
5757
"coverage": "istanbul cover -x 'apis/**' _mocha -- --reporter spec --timeout 4000",
5858
"test": "npm run lint && npm run build && npm run coverage",
5959
"coveralls": "istanbul cover -x 'apis/**' _mocha --report lcovonly -- --reporter spec --timeout 4000 && cat coverage/lcov.info | coveralls",
6060
"build": "tsc",
61-
"clean": "find ./lib ./test -type f -name '*.js' -delete"
61+
"clean": "rm -rf lib test types"
6262
},
6363
"license": "Apache-2.0"
6464
}

lib/auth/authclient.ts renamed to ts/lib/auth/authclient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import DefaultTransporter from '../transporters';
17+
import { Transporter, DefaultTransporter } from '../transporters';
1818
import Credentials from './credentials';
1919

2020
abstract class AuthClient {
File renamed without changes.
File renamed without changes.

lib/auth/googleauth.ts renamed to ts/lib/auth/googleauth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ import * as fs from 'fs';
2626
import * as os from 'os';
2727
import * as path from 'path';
2828
import * as util from 'util';
29-
import DefaultTransporter from '../transporters';
29+
import { Transporter, DefaultTransporter } from '../transporters';
3030

3131
export default class GoogleAuth {
3232

33-
public transporter: DefaultTransporter;
33+
public transporter: Transporter;
3434

3535
/**
3636
* Caches a value indicating whether the auth layer is running on Google Compute Engine.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)