Skip to content

Commit b1a538e

Browse files
committed
refactor: switch to tsup
1 parent 5862e7e commit b1a538e

File tree

4 files changed

+41
-37
lines changed

4 files changed

+41
-37
lines changed

package.json

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
11
{
22
"name": "rollup-plugin-javascript-confuser",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A Rollup Plugin for js-confuser",
5-
"main": "dist/index.cjs.js",
6-
"module": "dist/index.es.js",
7-
"types": "dist/src",
5+
"main": "dist/index.js",
6+
"module": "dist/index.mjs",
7+
"types": "dist/index.d.ts",
8+
"typesVersions": {
9+
"*": {
10+
"import": [
11+
"./dist/index.d.mts"
12+
],
13+
"require": [
14+
"./dist/index.d.ts"
15+
]
16+
}
17+
},
18+
"exports": {
19+
".": {
20+
"require": {
21+
"types": "./dist/index.d.ts",
22+
"default": "./dist/index.js"
23+
},
24+
"import": {
25+
"types": "./dist/index.d.mts",
26+
"default": "./dist/index.mjs"
27+
}
28+
}
29+
},
830
"scripts": {
9-
"prepublish": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript --configImportAttributesKey with",
10-
"prebuild": "rm -rf dist/*"
31+
"prepublish": "tsup --config tsup.config.ts"
1132
},
1233
"repository": {
1334
"type": "git",
@@ -39,12 +60,10 @@
3960
"js-confuser": "^2.0.0"
4061
},
4162
"devDependencies": {
42-
"@rollup/plugin-node-resolve": "^16.0.1",
43-
"@rollup/plugin-typescript": "^12.1.4",
4463
"@biomejs/biome": "^2.0.6",
4564
"@types/node": "^22.16.0",
4665
"rollup": "^4.44.2",
47-
"tslib": "^2.8.1",
66+
"tsup": "^8.5.0",
4867
"typescript": "^5.8.3"
4968
},
5069
"files": [

rollup.config.ts

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

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"include": ["src/**/*.ts", "rollup.config.ts"],
2+
"include": ["src/**/*.ts"],
33
"exclude": ["node_modules", "dist"],
44
"compilerOptions": {
55
"strict": false,

tsup.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from "tsup";
2+
3+
export default defineConfig({
4+
entry: ["src/index.ts"],
5+
format: ["cjs", "esm"],
6+
dts: true,
7+
splitting: false,
8+
sourcemap: false,
9+
clean: true,
10+
minify: true,
11+
treeshake: true,
12+
});

0 commit comments

Comments
 (0)