Skip to content

Commit 5ef89cf

Browse files
committed
remove cjs build
1 parent c8a4fed commit 5ef89cf

File tree

5 files changed

+12
-49
lines changed

5 files changed

+12
-49
lines changed

package.json

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
"description": "For verifying Verifiable Credentials in the browser, Node.js, and React Native.",
44
"version": "1.0.0",
55
"scripts": {
6-
"build-cjs": "tsc -p tsconfig.cjs.json",
76
"build-esm": "tsc -p tsconfig.esm.json",
87
"build-types": "tsc -p tsconfig.types.json",
98
"build-test": "tsc -p tsconfig.test.json",
10-
"build": "npm run clear && npm run build-types && npm run build-cjs && npm run build-esm",
9+
"build": "npm run clear && npm run build-types && npm run build-esm",
1110
"clear": "rimraf dist/*",
1211
"lint": "eslint .",
1312
"lint:fix": "eslint --fix .",
@@ -16,24 +15,13 @@
1615
"rebuild": "npm run clear && npm run build",
1716
"test": "npm run lint && npm run test-node",
1817
"test-karma": "karma start karma.conf.cjs",
19-
"test-node-no-cov": "npm run build-test && mocha dist/esm/test/*.spec.js && rimraf dist/esm/test",
20-
"debug-test": "mocha dist/esm/test/Verify.v1.spec.js",
21-
"test-node": "npm run build-test && npx c8 --exclude 'dist/test/**' mocha dist/test/*.spec.js && rm -rf dist/esm/test || true",
18+
"test-node-no-cov": "npm run build-test && mocha dist/test/*.spec.js && rimraf dist/test",
19+
"test-node": "npm run build-test && npx c8 --exclude 'dist/test/**' mocha dist/test/*.spec.js && rm -rf dist/test || true",
2220
"coveralls": "npm run test; npx c8 --exclude 'dist/test/**' report --reporter=text-lcov > ./coverage/lcov.info"
2321
},
24-
"main": "dist/cjs/index.js",
25-
"module": "dist/esm/index.js",
2622
"type": "module",
27-
"browser": "dist/cjs/index.js",
28-
"types": "dist/types/index.d.ts",
29-
"exports": {
30-
".": {
31-
"require": "./dist/cjs/index.js",
32-
"import": "./dist/esm/index.js",
33-
"types": "./dist/types/index.d.ts"
34-
},
35-
"./package.json": "./package.json"
36-
},
23+
"types": "dist/index.d.ts",
24+
"exports": "./dist/index.js",
3725
"files": [
3826
"dist/**/*.js"
3927
],
@@ -55,6 +43,7 @@
5543
"@types/node": "^18.11.17",
5644
"@typescript-eslint/eslint-plugin": "^5.46.1",
5745
"@typescript-eslint/parser": "^5.46.1",
46+
"c8": "^10.1.3",
5847
"chai": "^4.3.7",
5948
"coveralls": "^3.1.1",
6049
"cross-env": "^7.0.3",

tsconfig.cjs.json

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

tsconfig.esm.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"strict": true,
44
"target": "es2022",
55
"lib": ["es2022", "dom"],
6-
"module": "es6",
6+
"module": "es2022",
77
"moduleResolution": "nodenext",
8-
"outDir": "dist/esm",
8+
"outDir": "dist",
99
"noImplicitAny": true,
1010
"removeComments": false,
1111
"preserveConstEnums": true,
@@ -22,5 +22,5 @@
2222
".eslintrc.js",
2323
"karma.conf.js"
2424
],
25-
"exclude": ["node_modules", "dist"]
25+
"exclude": ["node_modules", "dist", "test"]
2626
}

tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"lib": ["es2022", "dom"],
66
"module": "es2022",
77
"moduleResolution": "nodenext",
8-
"outDir": "dist/esm",
8+
"outDir": "dist",
99
"noImplicitAny": true,
1010
"removeComments": false,
1111
"preserveConstEnums": true,

tsconfig.types.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"lib": ["es2022", "dom"],
66
"module": "es2022",
77
"moduleResolution": "nodenext",
8-
"outDir": "dist/types",
8+
"outDir": "dist",
99
"noImplicitAny": true,
1010
"removeComments": false,
1111
"preserveConstEnums": true,
@@ -15,7 +15,7 @@
1515
"resolveJsonModule": true,
1616
"declaration": true,
1717
"emitDeclarationOnly": true,
18-
"declarationDir": "dist/types"
18+
"declarationDir": "dist"
1919
},
2020
"include": ["src/**/*"],
2121
"exclude": ["node_modules", "dist"]

0 commit comments

Comments
 (0)