From 14555ce92075f3087c053a508b5a76fd1bd862f0 Mon Sep 17 00:00:00 2001 From: Anmol Date: Tue, 8 Oct 2024 18:08:44 +0530 Subject: [PATCH] Revert "fix: distribution config" --- packages/hyperwebjs/package.json | 24 ++++++------------------ packages/hyperwebjs/tsconfig.esm.json | 9 +++++++++ packages/hyperwebjs/tsconfig.json | 21 +++++---------------- packages/hyperwebjs/tsconfig.node.json | 15 --------------- 4 files changed, 20 insertions(+), 49 deletions(-) create mode 100644 packages/hyperwebjs/tsconfig.esm.json delete mode 100644 packages/hyperwebjs/tsconfig.node.json diff --git a/packages/hyperwebjs/package.json b/packages/hyperwebjs/package.json index 994b265..71e13d5 100644 --- a/packages/hyperwebjs/package.json +++ b/packages/hyperwebjs/package.json @@ -3,18 +3,9 @@ "version": "0.0.3", "author": "Hyperweb ", "description": "JS client for Hyperweb", - "source": "src/index.ts", - "main": "dist/cjs/index.js", - "module": "dist/esm/index.js", - "types": "dist/cjs/index.d.ts", - "exports": { - ".": { - "types": "./dist/cjs/index.d.ts", - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.js" - }, - "./package.json": "./package.json" - }, + "main": "index.js", + "module": "esm/index.js", + "types": "index.d.ts", "homepage": "https://github.com/hyperweb-io/hyperweb-build", "license": "SEE LICENSE IN LICENSE", "publishConfig": { @@ -33,11 +24,8 @@ "clean": "rimraf dist/**", "prepare": "npm run build", "codegen": "ts-node ./scripts/codegen.ts", - "build": "npm run build:esm && npm run build:cjs", - "build:esm": "npm run clean; npm run codegen; tsc; tsc -p tsconfig.json; npm run copy", - "build:cjs": "npm run clean; npm run codegen; tsc; tsc -p tsconfig.node.json; npm run copy", - "build:esm:dev": "npm run clean; npm run codegen; tsc --declarationMap; tsc -p tsconfig.json; npm run copy", - "build:cjs:dev": "npm run clean; npm run codegen; tsc --declarationMap; tsc -p tsconfig.node.json; npm run copy", + "build": "npm run clean; npm run codegen; tsc; tsc -p tsconfig.esm.json; npm run copy", + "build:dev": "npm run clean; npm run codegen; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy", "lint": "eslint . --fix", "test": "jest", "test:watch": "jest --watch" @@ -57,4 +45,4 @@ }, "keywords": [], "gitHead": "6941f0f94c741b25c3ad79d1c4c758065f1e36d9" -} \ No newline at end of file +} diff --git a/packages/hyperwebjs/tsconfig.esm.json b/packages/hyperwebjs/tsconfig.esm.json new file mode 100644 index 0000000..800d750 --- /dev/null +++ b/packages/hyperwebjs/tsconfig.esm.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "dist/esm", + "module": "es2022", + "rootDir": "src/", + "declaration": false + } +} diff --git a/packages/hyperwebjs/tsconfig.json b/packages/hyperwebjs/tsconfig.json index ed0e9e6..1a9d569 100644 --- a/packages/hyperwebjs/tsconfig.json +++ b/packages/hyperwebjs/tsconfig.json @@ -1,20 +1,9 @@ { - "extends": "./tsconfig.json", + "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "dist/esm", - "module": "esnext", - "moduleResolution": "node", - "target": "es2022", - "lib": ["es2022", "dom"], - "rootDir": "src/", - "declaration": true, - "declarationMap": true, - "sourceMap": true, - "esModuleInterop": true, - "strict": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true + "outDir": "dist", + "rootDir": "src/" }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist"] + "include": ["src/**/*.ts"], + "exclude": ["dist", "node_modules", "**/*.spec.*", "**/*.test.*"] } diff --git a/packages/hyperwebjs/tsconfig.node.json b/packages/hyperwebjs/tsconfig.node.json deleted file mode 100644 index 5067830..0000000 --- a/packages/hyperwebjs/tsconfig.node.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "dist/cjs", - "rootDir": "src/", - "module": "commonjs", - "target": "es2015", - "esModuleInterop": true, - "moduleResolution": "node", - "declaration": true, - "sourceMap": true - }, - "include": ["src/**/*.ts"], - "exclude": ["dist", "node_modules", "**/*.spec.*", "**/*.test.*"] -}