Skip to content

Commit 8d8fd2b

Browse files
ltetzlaffsindresorhus
authored andcommitted
Refactor module in TypeScript (#28)
1 parent 83adc09 commit 8d8fd2b

File tree

7 files changed

+603
-376
lines changed

7 files changed

+603
-376
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
yarn.lock
3+
dist

index.js

Lines changed: 0 additions & 227 deletions
This file was deleted.

package.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@
1616
"node": ">=4"
1717
},
1818
"scripts": {
19-
"test": "xo && ava"
19+
"lint": "tslint --project .",
20+
"build": "tsc",
21+
"test": "npm run lint && npm run build && ava dist/tests",
22+
"prepublish": "npm run build && del dist/tests"
2023
},
24+
"main": "dist/index.js",
25+
"types": "dist/index.d.ts",
2126
"files": [
22-
"index.js"
27+
"dist"
2328
],
2429
"keywords": [
2530
"type",
@@ -43,8 +48,13 @@
4348
"compare"
4449
],
4550
"devDependencies": {
51+
"@types/jsdom": "^2.0.31",
52+
"@types/node": "^8.0.47",
4653
"ava": "*",
54+
"del-cli": "^1.1.0",
4755
"jsdom": "^9.12.0",
48-
"xo": "*"
56+
"tslint": "^5.8.0",
57+
"tslint-xo": "^0.2.1",
58+
"typescript": "^2.6.1"
4959
}
5060
}

0 commit comments

Comments
 (0)