Skip to content

Commit

Permalink
Merge pull request #2 from hyperweb-io/fix/hyperweb-package-dist
Browse files Browse the repository at this point in the history
fix: distribution config
  • Loading branch information
Anmol1696 authored Oct 8, 2024
2 parents f227cbe + 33147c9 commit 196bc96
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 20 deletions.
24 changes: 18 additions & 6 deletions packages/hyperwebjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@
"version": "0.0.3",
"author": "Hyperweb <[email protected]>",
"description": "JS client for Hyperweb",
"main": "index.js",
"module": "esm/index.js",
"types": "index.d.ts",
"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"
},
"homepage": "https://github.com/hyperweb-io/hyperweb-build",
"license": "SEE LICENSE IN LICENSE",
"publishConfig": {
Expand All @@ -24,8 +33,11 @@
"clean": "rimraf dist/**",
"prepare": "npm run build",
"codegen": "ts-node ./scripts/codegen.ts",
"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",
"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",
"lint": "eslint . --fix",
"test": "jest",
"test:watch": "jest --watch"
Expand All @@ -45,4 +57,4 @@
},
"keywords": [],
"gitHead": "6941f0f94c741b25c3ad79d1c4c758065f1e36d9"
}
}
9 changes: 0 additions & 9 deletions packages/hyperwebjs/tsconfig.esm.json

This file was deleted.

21 changes: 16 additions & 5 deletions packages/hyperwebjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
{
"extends": "../../tsconfig.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src/"
"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
},
"include": ["src/**/*.ts"],
"exclude": ["dist", "node_modules", "**/*.spec.*", "**/*.test.*"]
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
15 changes: 15 additions & 0 deletions packages/hyperwebjs/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"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.*"]
}

0 comments on commit 196bc96

Please sign in to comment.