Skip to content

Commit 7fcff1a

Browse files
authored
feat: migrate to tsup (offlegacy#10)
* feat: use tsup for build * chore: remove unused dependencies * fix: update homepage URL in package.json * chore: remove unused "use client" directive
1 parent 359f9ff commit 7fcff1a

5 files changed

Lines changed: 342 additions & 104 deletions

File tree

package.json

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,42 @@
22
"name": "@offlegacy/event-tracker",
33
"version": "1.0.3",
44
"description": "The best solution for event tracking in React applications.",
5+
"keywords": [
6+
"react",
7+
"analytics",
8+
"google-analytics",
9+
"amplitude",
10+
"logger",
11+
"event tracking",
12+
"tracker",
13+
"tracking"
14+
],
15+
"homepage": "https://event-tracker.offlegacy.org",
16+
"bugs": "https://github.com/offlegacy/event-tracker/issues",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/offlegacy/event-tracker.git"
20+
},
21+
"license": "MIT",
22+
"author": "@stakbucks <Hwang Taehwan>",
23+
"exports": {
24+
".": {
25+
"import": {
26+
"types": "./dist/index.d.ts",
27+
"default": "./dist/index.js"
28+
},
29+
"require": {
30+
"types": "./dist/index.d.cts",
31+
"default": "./dist/index.cjs"
32+
}
33+
},
34+
"./package.json": "./package.json"
35+
},
36+
"sideEffects": false,
37+
"type": "module",
538
"scripts": {
6-
"clean": "rimraf dist",
7-
"build": "pnpm clean && pnpm build:js && pnpm build:ts",
8-
"build:js": "node scripts/build.js",
9-
"build:ts": "pnpm tsc --emitDeclarationOnly",
39+
"dev": "tsup --watch",
40+
"build": "tsup",
1041
"dev:docs": "cd docs && pnpm dev",
1142
"test": "vitest --run",
1243
"test:watch": "vitest",
@@ -15,21 +46,12 @@
1546
"prepare": "husky",
1647
"release": "pnpm build && npm publish"
1748
},
18-
"types": "./dist/types/index.d.ts",
19-
"main": "./dist/cjs/index.js",
20-
"module": "./dist/esm/index.js",
21-
"exports": {
22-
".": {
23-
"types": "./dist/types/index.d.ts",
24-
"require": "./dist/cjs/index.js",
25-
"import": "./dist/esm/index.js"
26-
}
27-
},
49+
"main": "dist/index.cjs",
50+
"module": "dist/index.js",
51+
"types": "dist/index.d.ts",
2852
"files": [
2953
"dist"
3054
],
31-
"type": "module",
32-
"packageManager": "pnpm@9.14.2",
3355
"devDependencies": {
3456
"@cspell/eslint-plugin": "^8.17.1",
3557
"@eslint-react/eslint-plugin": "^1.22.1",
@@ -40,7 +62,6 @@
4062
"@types/react": "^19.0.2",
4163
"@typescript-eslint/eslint-plugin": "^8.18.2",
4264
"@typescript-eslint/parser": "^8.18.2",
43-
"esbuild": "^0.24.2",
4465
"eslint": "^9.17.0",
4566
"eslint-import-resolver-typescript": "^3.7.0",
4667
"eslint-plugin-import": "^2.31.0",
@@ -51,7 +72,7 @@
5172
"prettier": "^3.4.2",
5273
"react": "^18.3.1",
5374
"react-dom": "^18.3.1",
54-
"rimraf": "^6.0.1",
75+
"tsup": "^8.3.5",
5576
"typescript": "^5.7.2",
5677
"typescript-eslint": "^8.18.2",
5778
"vitest": "^2.1.8"
@@ -60,24 +81,8 @@
6081
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
6182
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
6283
},
63-
"repository": {
64-
"type": "git",
65-
"url": "git+https://github.com/offlegacy/event-tracker.git"
66-
},
67-
"author": "@stakbucks <Hwang Taehwan>",
68-
"license": "MIT",
69-
"bugs": {
70-
"url": "https://github.com/offlegacy/event-tracker/issues"
84+
"publishConfig": {
85+
"access": "public"
7186
},
72-
"homepage": "https://github.com/offlegacy/event-tracker#readme",
73-
"keywords": [
74-
"react",
75-
"analytics",
76-
"google-analytics",
77-
"amplitude",
78-
"logger",
79-
"event tracking",
80-
"tracker",
81-
"tracking"
82-
]
87+
"packageManager": "pnpm@9.14.2"
8388
}

0 commit comments

Comments
 (0)