Skip to content

Commit 35aefa7

Browse files
authored
Merge pull request #12 from coder-fang/develop
feat: build configuration
2 parents 3e5d9e0 + e398abf commit 35aefa7

File tree

6 files changed

+316
-3
lines changed

6 files changed

+316
-3
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7+
"dev": "tsup --watch",
8+
"build": "tsup",
79
"test": "vitest test",
810
"lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx,.json --fix --cache",
911
"lint:fix": "pnpm run lint --fix",
@@ -35,6 +37,7 @@
3537
"husky": "^8.0.3",
3638
"lint-staged": "^13.2.2",
3739
"prettier": "^2.8.8",
40+
"tsup": "^6.7.0",
3841
"typescript": "^5.0.4",
3942
"vitepress": "1.0.0-alpha.75",
4043
"vitest": "^0.31.0"

packages/core/package.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22
"name": "@tsuse/core",
33
"version": "1.0.0",
44
"description": "",
5-
"main": "index.js",
5+
"main": "./dist/index.js",
6+
"module": "./dist/index.mjs",
7+
"unpkg": "./dist/index.global.js",
8+
"types": "./dist/index.d.ts",
9+
"exports": {
10+
".": {
11+
"require": "./dist/index.js",
12+
"import": "./dist/index.mjs",
13+
"types": "./dist/index.d.ts"
14+
},
15+
"./*": "./*"
16+
},
17+
"engines": {
18+
"node": ">=14",
19+
"pnpm": ">=7.0.0"
20+
},
21+
"publishConfig": {
22+
"access": "public"
23+
},
624
"scripts": {
725
"test": "echo \"Error: no test specified\" && exit 1"
826
},

packages/shared/package.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22
"name": "@tsuse/shared",
33
"version": "1.0.0",
44
"description": "",
5-
"main": "index.js",
5+
"main": "./dist/index.js",
6+
"module": "./dist/index.mjs",
7+
"unpkg": "./dist/index.global.js",
8+
"types": "./dist/index.d.ts",
9+
"exports": {
10+
".": {
11+
"require": "./dist/index.js",
12+
"import": "./dist/index.mjs",
13+
"types": "./dist/index.d.ts"
14+
},
15+
"./*": "./*"
16+
},
17+
"engines": {
18+
"node": ">=14",
19+
"pnpm": ">=7.0.0"
20+
},
21+
"publishConfig": {
22+
"access": "public"
23+
},
624
"scripts": {
725
"test": "echo \"Error: no test specified\" && exit 1"
826
},

0 commit comments

Comments
 (0)