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 Jun 12, 2019
1 parent 145252d commit b9ec53d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"email": "[email protected]",
"url": "sindresorhus.com"
},
"main": "dist/source",
"main": "dist",
"engines": {
"node": ">=8"
},
"scripts": {
"prepublishOnly": "npm run build",
"pretest": "npm run compile -- --sourceMap",
"test": "xo && nyc ava",
"test": "xo && ava",
"build": "npm run clean && webpack",
"compile": "npm run clean && tsc",
"clean": "del-cli dist",
Expand Down Expand Up @@ -66,6 +66,7 @@
"license-webpack-plugin": "^2.0.2",
"lodash.isequal": "^4.5.0",
"nyc": "^14.1.1",
"ts-node": "^8.0.2",
"typedoc": "^0.14.2",
"typescript": "~3.5.1",
"vali-date": "^1.0.0",
Expand Down Expand Up @@ -105,11 +106,17 @@
"files": [
"dist/test/**",
"!dist/test/fixtures/**"
],
"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 b9ec53d

Please sign in to comment.