Skip to content

Commit

Permalink
fix tsc compile error
Browse files Browse the repository at this point in the history
* enable composite and referrences in tsconfig
  • Loading branch information
ianhe8x committed Dec 18, 2020
1 parent d53392a commit 9e04323
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $ npm install -g @subql/cli
$ subql COMMAND
running command...
$ subql (-v|--version|version)
@subql/cli/0.1.1 darwin-x64 node-v12.16.3
@subql/cli/0.1.1 darwin-x64 node-v14.15.2
$ subql --help [COMMAND]
USAGE
$ subql COMMAND
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@
},
"repository": "packages/cli",
"scripts": {
"build": "rm -rf lib && tsc -b",
"postpack": "rm -f oclif.manifest.json",
"posttest": "eslint . --ext .ts --config .eslintrc",
"prepack": "rm -rf lib && tsc -b && cp -r src/template lib/ && oclif-dev manifest && oclif-dev readme",
"prepack": "yarn build && cp -r src/template lib/ && oclif-dev manifest && oclif-dev readme",
"test": "echo NO TESTS",
"version": "oclif-dev readme && git add README.md"
},
Expand Down
18 changes: 0 additions & 18 deletions packages/cli/src/db/index.ts

This file was deleted.

5 changes: 5 additions & 0 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
"experimentalDecorators": true,
"esModuleInterop": true,
"importHelpers": true,
"rootDir": "src",
"tsBuildInfoFile": "lib/.tsbuildinfo",
"outDir": "lib"
},
"references": [
{"path": "../common"}
],
"include": [
"src/**/*"
]
Expand Down
2 changes: 2 additions & 0 deletions packages/common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"tsBuildInfoFile": "dist/.tsbuildinfo",
"outDir": "dist"
},
"include": ["src/**/*"]
Expand Down
2 changes: 1 addition & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "Apache-2.0",
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"build": "rm -rf dist && tsc -b",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "nodemon",
Expand Down
6 changes: 6 additions & 0 deletions packages/node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
"compilerOptions": {
"target": "es2017",
"sourceMap": true,
"tsBuildInfoFile": "dist/.tsbuildinfo",
"rootDir": "src",
"outDir": "./dist"
},
"references": [
{"path": "../common"},
{"path": "../types"}
],
"include": ["src/**/*"]
}
2 changes: 2 additions & 0 deletions packages/types/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"tsBuildInfoFile": "dist/.tsbuildinfo",
"rootDir": "src",
"outDir": "dist"
},
"include": ["src/**/*"]
Expand Down
12 changes: 9 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,21 @@
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"skipLibCheck": true,
"incremental": true,
"composite": true,
"paths": {
"@subql/common": ["packages/common/src"],
"@subql/common/*": ["packages/common/src/*"],
"@subql/types": ["packages/types/src"],
"@subql/types/*": ["packages/types/src/*"]
}
},
"skipLibCheck": true
},
"references": [
{"path": "packages/cli"},
{"path": "packages/common"},
{"path": "packages/node"},
{"path": "packages/types"}
],
"include": ["packages/**/*"],
"exclude": ["**/node_modules/**"],
"typeRoots": ["./node_modules/@types"]
Expand Down

0 comments on commit 9e04323

Please sign in to comment.