Skip to content

Commit

Permalink
🏗 Introduce TypeScript project references
Browse files Browse the repository at this point in the history
  • Loading branch information
screendriver committed Nov 9, 2018
1 parent 74023fa commit 3bcbe1c
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"test:integration": "tape -r source-map-support/register 'dist/test/integration/**/*.js' | tap-dot",
"test": "yarn lint && yarn test:unit && yarn test:integration && yarn coverage",
"coverage": "nyc report --reporter=text-summary",
"build": "tsc"
"build": "tsc --build"
},
"dependencies": {
"micro": "9.3.3",
Expand Down
7 changes: 7 additions & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "../dist/src",
"rootDir": "."
}
}
8 changes: 8 additions & 0 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "../dist/test",
"rootDir": "."
},
"references": [{ "path": "../src" }]
}
25 changes: 25 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "./dist",
"removeComments": true,
"noEmitOnError": true,
"importHelpers": true,
"sourceMap": true,
"declaration": true,
"declarationMap": true,
"composite": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"plugins": [{ "name": "typescript-tslint-plugin" }],
"typeRoots": ["./typings", "./node_modules/@types"],
"lib": ["es2015"]
}
}
23 changes: 2 additions & 21 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
{
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"moduleResolution": "node",
"declaration": true,
"outDir": "./dist",
"noEmitOnError": true,
"importHelpers": true,
"sourceMap": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"plugins": [{ "name": "typescript-tslint-plugin" }],
"typeRoots": ["./typings", "./node_modules/@types"]
},
"include": ["src/**/*", "test/**/*"],
"exclude": ["node_modules"]
"files": [],
"references": [{ "path": "./src" }, { "path": "./test" }]
}

0 comments on commit 3bcbe1c

Please sign in to comment.