Skip to content

Use @types instead of typings #106

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

Merged
merged 9 commits into from
May 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ coverage/
node_modules/
npm-debug.log
dist/
typings/
popsicle.js
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,19 +409,7 @@ This module is designed for ES5 environments, but requires two ES2015 polyfills

## TypeScript

This project is written using [TypeScript](https://github.com/Microsoft/TypeScript) and [typings](https://github.com/typings/typings). Since version `1.3.1`, you can install the type definition using `typings`.

```
typings install npm:popsicle --save
```

Note that for a brand new project you might need to add the definition for node via the following command:

```
typings install env~node --save --global
```

Make sure you add `typings/index.d.ts` to your TypeScript project (using `files` or `includes` in `tsconfig.json`) if it isn't already.
This project is written using [TypeScript](https://github.com/Microsoft/TypeScript) and publishes the typings to NPM alongside the package.

## Development

Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "9.2.0",
"description": "Simple HTTP requests for node and the browser",
"main": "dist/common.js",
"types": "dist/common.d.ts",
"files": [
"dist/",
"typings.json",
"LICENSE",
"logo.svg"
],
Expand All @@ -27,7 +27,7 @@
"test-server-open": "PORT=7357 node scripts/server.js & echo $! > server.pid; HTTPS_PORT=7358 node scripts/https-server.js & echo $! > https-server.pid",
"test-server-close": "if [ -f server.pid ]; then kill -9 $(cat server.pid); rm server.pid; fi; if [ -f https-server.pid ]; then kill -9 $(cat https-server.pid); rm https-server.pid; fi",
"test": "npm run lint && npm run build && npm run test-server-open && npm run test-cov && npm run test-browser; EXIT=$?; npm run test-server-close; exit $EXIT",
"prepublish": "typings install && npm run build"
"prepublish": "npm run build"
},
"repository": {
"type": "git",
Expand All @@ -53,6 +53,7 @@
},
"homepage": "https://github.com/blakeembrey/popsicle",
"devDependencies": {
"@types/blue-tape": "^0.1.30",
"@types/node": "^8.0.0",
"blue-tape": "^1.0.0",
"bluebird": "^3.0.5",
Expand All @@ -66,10 +67,13 @@
"tape-run": "3.0.0",
"tslint": "^5.2.0",
"tslint-config-standard": "^7.0.0",
"typescript": "^2.4.1",
"typings": "^2.0.0"
"typescript": "^2.4.1"
},
"dependencies": {
"@types/concat-stream": "^1.6.0",
"@types/form-data": "0.0.33",
"@types/methods": "^1.1.0",
"@types/tough-cookie": "^2.3.0",
"concat-stream": "^1.4.7",
"form-data": "^2.0.0",
"make-error-cause": "^1.2.1",
Expand Down
7 changes: 1 addition & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,5 @@
"removeComments": true,
"sourceMap": true,
"inlineSources": true
},
"include": [
"src/**/*",
"custom_typings/**/*",
"typings/**/*"
]
}
}
12 changes: 0 additions & 12 deletions typings.json

This file was deleted.