Skip to content

Commit

Permalink
Run TS as a require hook for tests instead of precompile
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Feb 4, 2019
1 parent 6c813d9 commit e0a1bb2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@
"email": "[email protected]",
"url": "sindresorhus.com"
},
"main": "dist/source",
"main": "dist",
"engines": {
"node": ">=6"
},
"scripts": {
"prepublishOnly": "npm run build",
"pretest": "npm run compile -- --sourceMap",
"test": "npm run lint && nyc ava dist/test",
"lint": "tslint --format stylish --project .",
"test": "npm run lint && ava",
"build": "npm run clean && webpack",
"compile": "npm run clean && tsc",
"clean": "del dist",
"docs": "typedoc source"
},
Expand Down Expand Up @@ -63,6 +61,7 @@
"license-webpack-plugin": "^2.0.2",
"lodash.isequal": "^4.5.0",
"nyc": "^13.1.0",
"ts-node": "^8.0.2",
"tslint": "^5.12.0",
"tslint-xo": "^0.13.0",
"typedoc": "^0.14.2",
Expand All @@ -75,11 +74,17 @@
"sideEffects": false,
"ava": {
"babel": false,
"compileEnhancements": false
"compileEnhancements": false,
"extensions": [
"ts"
],
"require": [
"ts-node/register"
]
},
"nyc": {
"exclude": [
"dist/test"
"extension": [
".ts"
]
}
}
4 changes: 1 addition & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@
]
},
"include": [
"source",
"test"
"source"
],
"typedocOptions": {
"out": "docs",
"mode": "file",
"target": "ES6",
"module": "commonjs",
"moduleResolution": "node",
"exclude": "source/test",
"ignoreCompilerErrors": true,
"excludePrivate": true,
"excludeNotExported": true,
Expand Down

0 comments on commit e0a1bb2

Please sign in to comment.