Skip to content

Commit 9d87f76

Browse files
trivikrsrchase
authored andcommitted
Use @tsconfig/recommended and add tsconfig.cjs.json (smithy-lang#493)
1 parent f82c874 commit 9d87f76

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenVisitor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class CodegenVisitor extends ShapeVisitor.Default<Void> {
7272
private static final Map<String, String> STATIC_FILE_COPIES = MapUtils.of(
7373
"typedoc.json", "typedoc.json",
7474
"tsconfig.json", "tsconfig.json",
75+
"tsconfig.cjs.json", "tsconfig.cjs.json",
7576
"tsconfig.es.json", "tsconfig.es.json",
7677
"tsconfig.types.json", "tsconfig.types.json"
7778
);

smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/base-package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "${packageVersion}",
55
"scripts": {
66
"build": "${packageManager} build:cjs && ${packageManager} build:es && ${packageManager} build:types",
7-
"build:cjs": "tsc -p tsconfig.json",
7+
"build:cjs": "tsc -p tsconfig.cjs.json",
88
"build:docs": "typedoc",
99
"build:es": "tsc -p tsconfig.es.json",
1010
"build:types": "tsc -p tsconfig.types.json",
@@ -19,6 +19,7 @@
1919
"tslib": "^2.3.0"
2020
},
2121
"devDependencies": {
22+
"@tsconfig/recommended": "1.0.1",
2223
"downlevel-dts": "0.7.0",
2324
"rimraf": "^3.0.0",
2425
"typedoc": "^0.20.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig",
3+
"compilerOptions": {
4+
"target": "ES2018",
5+
"module": "commonjs",
6+
"outDir": "dist-cjs"
7+
}
8+
}
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
{
2+
"extends": "@tsconfig/recommended/tsconfig.json",
23
"compilerOptions": {
3-
"rootDir": "./src",
4-
"alwaysStrict": true,
5-
"target": "ES2018",
6-
"module": "commonjs",
7-
"strict": true,
84
"downlevelIteration": true,
95
"importHelpers": true,
10-
"noEmitHelpers": true,
116
"incremental": true,
7+
"removeComments": true,
128
"resolveJsonModule": true,
13-
"esModuleInterop": true,
14-
"outDir": "dist-cjs",
15-
"removeComments": true
16-
},
17-
"exclude": ["test/**/*"]
9+
"rootDir": "src"
10+
}
1811
}

0 commit comments

Comments
 (0)