Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate the code to typescript #18

Merged
merged 2 commits into from Jan 10, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Expand Up @@ -128,14 +128,14 @@ jobs:
- run:
name: Install modules and dependencies.
command: |
npm install
npm install --unsafe-perm

This comment was marked as spam.

This comment was marked as spam.

npm link
- run:
name: Link the module being tested to the samples.
command: |
cd samples/
npm link @google-cloud/logging-bunyan
npm install
npm link @google-cloud/logging-bunyan
cd ..
- run:
name: Run linting.
Expand Down Expand Up @@ -173,8 +173,8 @@ jobs:
name: Link the module being tested to the samples.
command: |
cd samples/
npm link @google-cloud/logging-bunyan
npm install
npm link @google-cloud/logging-bunyan
cd ..
- run:
name: Run sample tests.
Expand Down
22 changes: 17 additions & 5 deletions package.json
Expand Up @@ -8,9 +8,10 @@
"node": ">=4.0.0"
},
"repository": "googleapis/nodejs-logging-bunyan",
"main": "./src/index.js",
"main": "./build/src/index.js",
"types": "./build/src/index.d.ts",
"files": [
"src",
"build/src",
"AUTHORS",
"CONTRIBUTORS",
"LICENSE"
Expand Down Expand Up @@ -49,14 +50,24 @@
"lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/",
"prettier": "repo-tools exec -- prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"system-test": "repo-tools test run --cmd mocha -- system-test/*.js --no-timeouts --bail",
"test": "repo-tools test run --cmd mocha -- test/*.js"
"system-test": "repo-tools test run --cmd mocha -- build/system-test/*.js --no-timeouts --bail",
"test": "repo-tools test run --cmd mocha -- build/test/*.js",
"check": "gts check",
"clean": "gts clean",
"compile": "tsc -p .",
"fix": "gts fix",
"prepare": "npm run compile",
"pretest": "npm run compile",
"posttest": "npm run check"
},
"dependencies": {
"@google-cloud/logging": "^1.0.0",
"extend": "^3.0.1"
"@types/bunyan": "^1.8.3",
"typescript": "~2.6.1"
},
"devDependencies": {
"@types/mocha": "^2.2.41",
"@types/proxyquire": "^1.3.28",
"@google-cloud/nodejs-repo-tools": "^2.1.0",
"async": "^2.5.0",
"bunyan": "^1.8.5",
Expand All @@ -65,6 +76,7 @@
"eslint-config-prettier": "^2.6.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-prettier": "^2.3.1",
"gts": "^0.5.1",
"ink-docstrap": "^1.3.0",
"intelli-espower-loader": "^1.0.1",
"jsdoc": "^3.5.5",
Expand Down
2 changes: 1 addition & 1 deletion samples/quickstart.js
Expand Up @@ -19,7 +19,7 @@
const bunyan = require('bunyan');

// Imports the Google Cloud client library for Bunyan
const LoggingBunyan = require('@google-cloud/logging-bunyan');
const LoggingBunyan = require('@google-cloud/logging-bunyan').LoggingBunyan;

// Creates a Bunyan Stackdriver Logging client
const loggingBunyan = new LoggingBunyan();
Expand Down