Skip to content

Commit 9e88a82

Browse files
committed
Wallet: align and add TypeScript configuration, align package.json scripts
1 parent 98ed2d5 commit 9e88a82

File tree

5 files changed

+33
-33
lines changed

5 files changed

+33
-33
lines changed

packages/wallet/package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,18 @@
2626
"dist.browser"
2727
],
2828
"scripts": {
29-
"postinstall": "npm run build",
30-
"build": "tsc -p tsconfig.prod.json",
31-
"prepublishOnly": "npm run lint && npm run build && npm run test",
32-
"docs:build": "typedoc --out docs --mode file --readme none --theme markdown --mdEngine github --excludeNotExported src",
29+
"build": "../../config/cli/ts-build.sh",
30+
"clean": "../../config/cli/clean-package.sh",
3331
"coverage": "npm run build && nyc --reporter=lcov npm run test:unit",
34-
"tsc": "tsc -p tsconfig.prod.json --noEmit",
35-
"lint": "eslint --format codeframe --config ./.eslintrc.js . --ext .js,.jsx,.ts,.tsx",
36-
"lint:fix": "eslint --fix --format codeframe --config ./.eslintrc.js . --ext .js,.jsx,.ts,.tsx",
37-
"test": "npm run test:unit && npm run test:browser",
38-
"test:unit": "mocha --require ts-node/register ./test/**/*.spec.ts",
39-
"test:browser": "karma start karma.conf.js"
32+
"docs:build": "npx typedoc --options typedoc.js",
33+
"lint": "../../config/cli/lint.sh",
34+
"lint:diff": "../../config/cli/lint-diff.sh",
35+
"lint:fix": "../../config/cli/lint-fix.sh",
36+
"prepublishOnly": "../../config/cli/prepublish.sh",
37+
"test": "npm run test:node && npm run test:browser",
38+
"test:browser": "karma start karma.conf.js",
39+
"test:node": "mocha --require ts-node/register ./test/**/*.spec.ts",
40+
"tsc": "../../config/cli/ts-compile.sh"
4041
},
4142
"dependencies": {
4243
"@ethereumjs/util": "^8.0.6",

packages/wallet/tsconfig.json

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
11
{
2-
"compilerOptions": {
3-
"sourceMap": true,
4-
"declaration": true,
5-
"declarationMap": true,
6-
"module": "commonjs",
7-
"moduleResolution": "node",
8-
"emitDecoratorMetadata": true,
9-
"experimentalDecorators": true,
10-
"esModuleInterop": false,
11-
"allowSyntheticDefaultImports": true,
12-
"resolveJsonModule": true,
13-
"downlevelIteration": true,
14-
"strict": true,
15-
"target": "es2020",
16-
"lib": ["ES2020", "DOM"]
17-
}
2+
"extends": "../../config/tsconfig.json",
3+
"include": ["src/**/*.ts", "test/**/*.ts"]
184
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../../config/tsconfig.prod.cjs.json",
3+
"compilerOptions": {
4+
"rootDir": "src",
5+
"outDir": "dist/cjs",
6+
"composite": true
7+
},
8+
"include": ["src/**/*.ts"],
9+
"references": [{ "path": "../util/tsconfig.prod.cjs.json" }]
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../../config/tsconfig.prod.esm.json",
3+
"compilerOptions": {
4+
"rootDir": "src",
5+
"outDir": "dist/esm",
6+
"composite": true
7+
},
8+
"include": ["src/**/*.ts"],
9+
"references": [{ "path": "../util/tsconfig.prod.esm.json" }]
10+
}

packages/wallet/tsconfig.prod.json

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

0 commit comments

Comments
 (0)