Skip to content

Commit

Permalink
chore(build): Enable incremental builds everywhere (#2603)
Browse files Browse the repository at this point in the history
Enables composite mode in all `tsconfig.json` files that are not
generated by `jsii`, enabling incremental build support throughout the
project surface.
  • Loading branch information
RomainMuller authored May 23, 2019
1 parent c41a0f6 commit d7b0324
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 20 deletions.
4 changes: 2 additions & 2 deletions packages/cdk-dasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"cdk-dasm": "bin/cdk-dasm"
},
"scripts": {
"build": "tsc && chmod +x bin/cdk-dasm",
"watch": "tsc -w",
"build": "tsc -b && chmod +x bin/cdk-dasm",
"watch": "tsc -b -w",
"test": "jest",
"package": "mkdir -p dist/js && cd dist/js && npm pack ../../",
"build+test+package": "npm run build+test && npm run package",
Expand Down
3 changes: 2 additions & 1 deletion packages/cdk-dasm/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"noFallthroughCasesInSwitch": true,
"inlineSourceMap": true,
"inlineSources": true,
"noEmitOnError": false
"noEmitOnError": false,
"composite": true
},
"exclude": [
"test/enrichments/**"
Expand Down
6 changes: 3 additions & 3 deletions packages/decdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"decdk-schema": "bin/decdk-schema"
},
"scripts": {
"build": "node ./deps.js && tsc && chmod +x bin/decdk && chmod +x bin/decdk-schema && bin/decdk-schema > cdk.schema.json",
"watch": "tsc -w",
"build": "node ./deps.js && tsc -b && chmod +x bin/decdk && chmod +x bin/decdk-schema && bin/decdk-schema > cdk.schema.json",
"watch": "tsc -b -w",
"test": "jest",
"package": "mkdir -p dist/js && cd dist/js && npm pack ../../",
"build+test": "npm run build && npm test",
Expand Down Expand Up @@ -151,4 +151,4 @@
"engines": {
"node": ">= 8.10.0"
}
}
}
7 changes: 6 additions & 1 deletion packages/decdk/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@
"noFallthroughCasesInSwitch": true,
"inlineSourceMap": true,
"inlineSources": true,
"noEmitOnError": false
"noEmitOnError": false,
"composite": true
},
"exclude": [
"test/enrichments/**"
],
"references": [
{ "path": "../@aws-cdk/cdk" },
{ "path": "../@aws-cdk/cx-api" }
]
}
4 changes: 2 additions & 2 deletions tools/awslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"description": "Enforces the AWS Construct Library guidelines",
"main": "index.js",
"scripts": {
"build": "tsc && chmod +x bin/awslint",
"build": "tsc -b && chmod +x bin/awslint",
"lint": "tslint && pkglint",
"test": "echo ok",
"watch": "tsc -w",
"watch": "tsc -b -w",
"build+test+package": "npm run build+test",
"build+test": "npm run build && npm test"
},
Expand Down
5 changes: 3 additions & 2 deletions tools/awslint/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"resolveJsonModule": true,
"strict": true,
"strictNullChecks": true,
"target": "ES2018"
"target": "ES2018",
"composite": true
},
"_generated_by_jsii_": "Generated by jsii - safe to delete, and ideally should be in .gitignore"
"include": ["**/*.ts"]
}
4 changes: 2 additions & 2 deletions tools/cdk-build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"cdk-awslint": "bin/cdk-awslint"
},
"scripts": {
"build": "tsc && tslint -p . && chmod +x bin/cdk-build && chmod +x bin/cdk-test && chmod +x bin/cdk-watch && chmod +x bin/cdk-awslint && pkglint",
"watch": "tsc -w",
"build": "tsc -b && tslint -p . && chmod +x bin/cdk-build && chmod +x bin/cdk-test && chmod +x bin/cdk-watch && chmod +x bin/cdk-awslint && pkglint",
"watch": "tsc -b -w",
"pkglint": "pkglint -f",
"build+test+package": "npm run build+test",
"build+test": "npm run build"
Expand Down
6 changes: 4 additions & 2 deletions tools/cdk-build-tools/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"inlineSourceMap": true,
"inlineSources": true
}
"inlineSources": true,
"composite": true
},
"include": ["**/*.ts"]
}
6 changes: 3 additions & 3 deletions tools/pkglint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"pkglint": "bin/pkglint"
},
"scripts": {
"build": "tsc && tslint -p . && chmod +x bin/pkglint",
"build": "tsc -b && tslint -p . && chmod +x bin/pkglint",
"build+test": "npm run build",
"build+test+package": "npm run build",
"watch": "tsc -w",
"lint": "tsc && tslint -p . --force"
"watch": "tsc -b -w",
"lint": "tsc -b && tslint -p . --force"
},
"keywords": [
"aws",
Expand Down
6 changes: 4 additions & 2 deletions tools/pkglint/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"inlineSourceMap": true,
"inlineSources": true
}
"inlineSources": true,
"composite": true
},
"include": ["**/*.ts"]
}

0 comments on commit d7b0324

Please sign in to comment.