Skip to content

Commit 08630a4

Browse files
AllanZhengYPkstich
authored andcommitted
update tsconfigs and package.json
1 parent 47923e0 commit 08630a4

File tree

4 files changed

+24
-13
lines changed

4 files changed

+24
-13
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ class CodegenVisitor extends ShapeVisitor.Default<Void> {
5353
/** A mapping of static resource files to copy over to a new filename. */
5454
private static final Map<String, String> STATIC_FILE_COPIES = MapUtils.of(
5555
"tsconfig.es.json", "tsconfig.es.json",
56-
"tsconfig.json", "tsconfig.json",
57-
"tsconfig.test.json", "tsconfig.test.json"
56+
"tsconfig.json", "tsconfig.json"
5857
);
5958

6059
private final TypeScriptSettings settings;

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

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,36 @@
33
"description": "${packageDescription}",
44
"version": "${packageVersion}",
55
"scripts": {
6-
"clean": "npm run remove-definitions && npm run remove-maps && npm run remove-js",
6+
"clean": "npm run remove-definitions && npm run remove-dist && npm run remove-js && npm run remove-maps",
77
"build-documentation": "npm run clean && typedoc ./",
8-
"prepublishOnly": "tsc",
8+
"prepublishOnly": "yarn build",
99
"pretest": "tsc",
10-
"remove-definitions": "rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./types/*.d.ts",
10+
"remove-definitions": "rimraf ./types",
11+
"remove-dist": "rimraf ./dist",
1112
"remove-documentation": "rimraf ./docs",
12-
"remove-js": "rimraf *.js && rimraf ./commands/*.js && rimraf ./shared/*.js && rimraf ./types/*.js",
13-
"remove-maps": "rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./shared/*.js.map && rimraf ./types/*.js.map",
13+
"remove-js": "rimraf *.js && rimraf ./commands/*.js && rimraf ./lib/*.js && rimraf ./models/*.js && rimraf ./protocols/*.js",
14+
"remove-maps": "rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./lib/*.js.map && rimraf ./models/*.js.map && rimraf ./protocols/*.js.map",
1415
"test": "exit 0",
15-
"smoke-test": "karma start karma.conf"
16+
"smoke-test": "npm run pretest && node ./test/smoke/index.spec.js",
17+
"build:es": "tsc -p tsconfig.es.json",
18+
"build": "yarn pretest && yarn build:es"
1619
},
1720
"main": "./index.js",
1821
"types": "./index.d.ts",
19-
"dependencies": {},
22+
"module": "./dist/es/index.js",
23+
"browser": {
24+
"./runtimeConfig": "./runtimeConfig.browser"
25+
},
26+
"sideEffects": false,
27+
"dependencies": {
28+
"tslib": "^1.8.0"
29+
},
2030
"devDependencies": {
2131
"rimraf": "^3.0.0",
2232
"typedoc": "^0.15.0",
2333
"typescript": "^3.6.3"
34+
},
35+
"engines": {
36+
"node": ">=8.0.0"
2437
}
2538
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"alwaysStrict": true,
34
"target": "es2017",
45
"module": "commonjs",
56
"declaration": true,
@@ -11,7 +12,8 @@
1112
"incremental": true,
1213
"resolveJsonModule": true,
1314
"noUnusedLocals": true,
14-
"declarationDir": "./types"
15+
"declarationDir": "./types",
16+
"outDir": "dist/cjs"
1517
},
1618
"typedocOptions": {
1719
"exclude": "**/node_modules/**",

smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/tsconfig.test.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)