Skip to content

Commit

Permalink
New: Added types to npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Westy Larsen committed Dec 4, 2018
1 parent 9d90814 commit 9c7693a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
spec
src
.commitlintrc
.editorconfig
.eslintrc
.gitignore
.nvmrc
.releaserc
.travis.yml
tsconfig.*
tslint.json
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
"review"
],
"main": "./dist/trustpilot-api.js",
"types": "./dist/trustpilot-api.d.ts",
"scripts": {
"tsc": "tsc -p tsconfig.build.json",
"test": "mocha --compilers ts:ts-node/register ./spec/*.spec.ts",
"lint": "tslint -c tslint.json --fix -e node_modules/** **/*.ts",
"lint": "tslint -c tslint.json --fix -e node_modules/** -e **/*.d.ts **/*.ts",
"build": "npm run tsc && npm run test && npm run lint",
"start": "node dist/client.js"
},
Expand Down
1 change: 1 addition & 0 deletions src/request-helper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { RequestAPI, UriOptions, UrlOptions } from 'request';
import * as rp from 'request-promise-native';
import { AccessProvider } from './access-provider';

Expand Down
2 changes: 2 additions & 0 deletions src/trustpilot-api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { RequestAPI, UriOptions, UrlOptions } from 'request';
import { RequestPromise, RequestPromiseOptions } from 'request-promise-native';
import { AccessProvider } from './access-provider';
import { ITrustpilotApiConfig } from './models';
import { RequestHelper } from './request-helper';
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"removeComments": true,
"sourceMap": true,
"skipLibCheck": true,
"inlineSources": true
"inlineSources": true,
"declaration": true,
},
"exclude": [
"node_modules"
Expand Down

0 comments on commit 9c7693a

Please sign in to comment.