Skip to content

Commit

Permalink
build: tsup bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Sep 29, 2024
1 parent 848091e commit 8be79db
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 28 deletions.
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"should": "^13.2.3",
"ssh2-connect": "^4.0.3",
"standard-version": "^9.5.0",
"tsup": "^8.3.0",
"tsx": "^4.19.1",
"typedoc": "^0.26.7",
"typedoc-plugin-markdown": "^4.2.8",
Expand All @@ -44,14 +45,14 @@
},
"exports": {
".": {
"import": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"require": "./dist/cjs/index.cjs"
"import": "./dist/index.js",
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs"
},
"./promises": {
"import": "./dist/esm/promises.js",
"types": "./dist/types/promises.d.ts",
"require": "./dist/cjs/promises.cjs"
"import": "./dist/promises.js",
"types": "./dist/promises.d.ts",
"require": "./dist/promises.cjs"
}
},
"files": [
Expand All @@ -77,7 +78,7 @@
"url": "https://github.com/adaltas/node-ssh2-exec.git"
},
"scripts": {
"build": "tsc --project tsconfig.esm.json && tsc --project tsconfig.cjs.json",
"build": "tsup-node",
"lint:check": "eslint",
"lint:fix": "eslint --fix",
"lint:staged": "npx lint-staged",
Expand Down
11 changes: 0 additions & 11 deletions tsconfig.cjs.json

This file was deleted.

10 changes: 0 additions & 10 deletions tsconfig.esm.json

This file was deleted.

13 changes: 13 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["src/index.ts", "src/promises.ts"],
outDir: "dist",
clean: true,
format: ["esm", "cjs"],
target: ["esnext", "esnext"],
dts: true,
minify: false,
sourcemap: false,
splitting: true,
});

0 comments on commit 8be79db

Please sign in to comment.