Setup Typescript, ignores and compiler options
This commit is contained in:
parent
83adc096ef
commit
d85736e4af
4 changed files with 30 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,2 +1,5 @@
|
|||
node_modules
|
||||
yarn.lock
|
||||
|
||||
index.js
|
||||
index.d.ts
|
||||
1
.npmignore
Normal file
1
.npmignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
index.ts
|
||||
|
|
@ -16,10 +16,13 @@
|
|||
"node": ">=4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
"test": "xo && ava",
|
||||
"build": "tsc",
|
||||
"prepublish": "tsc"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"type",
|
||||
|
|
@ -43,8 +46,10 @@
|
|||
"compare"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/node": "^8.0.47",
|
||||
"ava": "*",
|
||||
"jsdom": "^9.12.0",
|
||||
"typescript": "^2.6.1",
|
||||
"xo": "*"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
19
tsconfig.json
Normal file
19
tsconfig.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"compileOnSave": true,
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"moduleResolution": "node",
|
||||
"strict": true,
|
||||
"alwaysStrict": true,
|
||||
"declaration": true,
|
||||
"outDir": ".",
|
||||
"noImplicitAny": true,
|
||||
"suppressImplicitAnyIndexErrors": true
|
||||
},
|
||||
"include": [
|
||||
"index.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue