diff --git a/README.md b/README.md
index 790786b1..102a03d7 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,13 @@
-# vue-jest
+# vue-jest-kn
+
+Jest Vue transformer with source map support
+custom tsconfig support - temporary npm, please avoid usage as it will be deleted sooner than later
-Jest Vue transformer with source map support
## Usage
```
-npm install --save-dev vue-jest
+npm install --save-dev vue-jest-kn
```
## Setup
@@ -14,7 +16,7 @@ To define vue-jest as a transformer for your .vue files, you need to map .vue fi
```
"transform": {
- ".*\\.(vue)$": "/node_modules/vue-jest"
+ ".*\\.(vue)$": "/node_modules/vue-jest-kn"
},
```
@@ -30,7 +32,7 @@ To use source maps, you need to set `mapCoverage` to `true`. A full config will
],
"transform": {
"^.+\\.js$": "/node_modules/babel-jest",
- ".*\\.(vue)$": "/node_modules/vue-jest"
+ ".*\\.(vue)$": "/node_modules/vue-jest-kn"
},
"mapCoverage": true
}
diff --git a/lib/compilers/typescript-compiler.js b/lib/compilers/typescript-compiler.js
index 1cb7c118..e3d72e75 100644
--- a/lib/compilers/typescript-compiler.js
+++ b/lib/compilers/typescript-compiler.js
@@ -4,6 +4,7 @@ const compileBabel = require('./babel-compiler')
const loadBabelConfig = require('../load-babel-config.js')
const cache = require('../cache')
const logger = require('../logger')
+const fs = require('fs')
const defaultTypescriptConfig = {
'compilerOptions': {
@@ -34,7 +35,12 @@ function getTypescriptConfig () {
if (cachedConfig) {
return cachedConfig
} else {
- const { config } = tsconfig.loadSync(process.cwd())
+ const tscPath = process.cwd()
+ let tscFile = 'tsconfig.jest.json'
+ if (!fs.existsSync(tscPath+ '/'+ tscFile)){
+ tscFile = false
+ }
+ const { config } = tsconfig.loadSync(tscPath, tscFile)
if (!config) {
logger.info('no tsconfig.json found, defaulting to default typescript options')
diff --git a/package.json b/package.json
index 19dad6f9..ebc96d49 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
- "name": "vue-jest",
+ "name": "vue-jest-kn",
"version": "2.0.1",
- "description": "Jest Vue transform",
+ "description": "Jest Vue transform that loads a custom tsconfig - temporary",
"main": "vue-jest.js",
"files": [
"vue-jest.js",
@@ -27,7 +27,7 @@
"unit": "./test.sh",
"unit:run": "jest test --no-cache --runInBand --coverage --coverageDirectory test/coverage"
},
- "author": "Edd Yerburgh",
+ "author": "Edd Yerburgh, Lars Eggert",
"license": "MIT",
"devDependencies": {
"babel-core": "^6.25.0",
@@ -82,6 +82,14 @@
},
"repository": {
"type": "git",
- "url": "git+https://github.com/eddyerburgh/vue-jest.git"
+ "url": "git+https://github.com/webforgeeu/vue-jest"
+ },
+ "bugs": {
+ "url": "https://github.com/webforgeeu/vue-jest/issues"
+ },
+ "homepage": "https://github.com/webforgeeu/vue-jest#readme",
+ "directories": {
+ "lib": "lib",
+ "test": "test"
}
}