Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 1c87257

Browse files
committed
build: add clean package before publish
Signed-off-by: Shyrro <[email protected]>
1 parent 7e2bf23 commit 1c87257

File tree

49 files changed

+102
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+102
-97
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
to: packages/<%=h.changeCase.paramCase(name)%>/src/index.tsx
2+
to: packages/<%=h.changeCase.paramCase(name)%>/src/index.ts
33
---
44

55
export * from "./<%=h.changeCase.paramCase(name)%>"

_templates/generator/component/package.json.ejs.t

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,11 @@ to: packages/<%=h.changeCase.paramCase(name)%>/package.json
99
"author": "Jonathan Bakebwa <codebender828@gmail.com>",
1010
"homepage": "https://github.com/chakra-ui/chakra-ui-vue-next#readme",
1111
"license": "MIT",
12-
"main": "dist/index.js",
13-
"module": "dist/index.mjs",
14-
"typings": "dist/index.d.ts",
12+
"main": "src/index.ts",
13+
"clean-package": "../../clean-package.config.json",
1514
"files": [
1615
"dist"
1716
],
18-
"exports": {
19-
".": {
20-
"require": "./dist/index.js",
21-
"default": "./dist/index.mjs"
22-
}
23-
},
2417
"repository": {
2518
"type": "git",
2619
"url": "git+https://github.com/chakra-ui/chakra-ui-vue-next.git"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
to: packages/<%=h.changeCase.paramCase(name)%>/index.ts
3+
---
4+
5+
export * from "./src"

_templates/generator/component/src-index.tsx.ejs.t

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

clean-package.config.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2-
"main": "dist/index.js",
3-
"module": "dist/index.mjs",
4-
"types": "dist/index.d.ts",
5-
"exports": {
6-
".": {
7-
"types": "dist/index.d.ts",
8-
"require": "./dist/index.js",
9-
"default": "./dist/index.mjs"
2+
"replace": {
3+
"main": "dist/index.js",
4+
"module": "dist/index.mjs",
5+
"types": "dist/index.d.ts",
6+
"exports": {
7+
".": {
8+
"types": "./dist/index.d.ts",
9+
"require": "./dist/index.js",
10+
"default": "./dist/index.mjs"
11+
}
1012
}
1113
}
1214
}

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
]
1414
},
1515
"scripts": {
16-
"dev": "concurrently \"pnpm turbo:dev\" \"pnpm playground:dev\"",
17-
"turbo:dev": "turbo run dev",
1816
"clean": "pnpm -r --parallel run clean",
1917
"prebuild": "pnpm clean",
2018
"build": "turbo run build --filter=!./examples/* --filter=!{./packages/test-utils}",
@@ -26,8 +24,7 @@
2624
"build:fast": "turbo run build:fast --filter=!./examples/* --filter=!{./packages/test-utils}",
2725
"postbuild:fast": "pnpm pkgs:size",
2826
"scaffold": "hygen generator",
29-
"preplaygound:dev": "node ./scripts/dev.js",
30-
"playground:dev": "cross-env NODE_ENV=development vite serve playground --config ./vite.config.ts --open",
27+
"dev": "cross-env NODE_ENV=development vite serve playground --config ./vite.config.ts --open",
3128
"preplaygound:build": "node ./scripts/dev.js",
3229
"playground:build": "pnpm install && cross-env NODE_ENV=production vite build playground --config ./vite.config.ts",
3330
"cy:open": "cypress open",
@@ -61,7 +58,9 @@
6158
"process:packages": "pnpm jiti ./scripts/process-packages.ts process-packages",
6259
"pkgs:size": "pnpm jiti ./scripts/plugins/size-packages.ts",
6360
"version": "changeset version",
64-
"release": "changeset publish",
61+
"prepublish": "pnpm -r --filter=!chakra-ui-vue-next prepublish",
62+
"postpublish": "pnpm -r --filter=!chakra-ui-vue-next postpublish",
63+
"release": "pnpm prepublish && changeset publish",
6564
"version:dev": "changeset version --snapshot dev",
6665
"release:dev": "changeset pre exit && changeset version --snapshot dev && changeset publish --tag dev"
6766
},

packages/c-accordion/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@chakra-ui/c-accordion",
33
"version": "2.1.0-beta.11",
44
"main": "./index.ts",
5+
"clean-package": "../../clean-package.config.json",
56
"files": [
67
"dist"
78
],

packages/c-alert/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "@chakra-ui/c-alert",
33
"version": "2.1.0-beta.11",
4-
"main": "index.ts",
5-
"types": "index.ts",
4+
"main": "./index.ts",
5+
"types": "./index.ts",
6+
"clean-package": "../../clean-package.config.json",
67
"files": [
78
"dist"
89
],

packages/c-avatar/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"description": "Chakra UI Vue | The avatar component is used to represent user and displays the profile picture initials or fallback icon component",
44
"version": "2.1.0-beta.11",
55
"main": "./index.ts",
6+
"clean-package": "../../clean-package.config.json",
67
"author": "Shyrro <[email protected]>",
78
"homepage": "https://github.com/chakra-ui/chakra-ui-vue-next#readme",
89
"license": "MIT",
910
"files": [
1011
"dist"
1112
],
12-
1313
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next/tree/master/packages/c-avatar",
1414
"bugs": {
1515
"url": "https://github.com/chakra-ui/chakra-ui-vue-next/issues"
@@ -21,7 +21,7 @@
2121
"build:fast": "tsup",
2222
"types:check": "tsc --noEmit",
2323
"prepublish": "clean-package",
24-
"postpublish": "clean-package restore",
24+
"postpublish": "clean-package restore",
2525
"build:types": "tsup src --dts-only"
2626
},
2727
"dependencies": {

packages/c-avatar/src/c-avatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export const CAvatar = defineComponent({
202202
} else if (props.icon) {
203203
return match(typeof props.icon as any, {
204204
string: h(createIconComponent(props.icon as string) as any),
205-
object: h(props.icon),
205+
object: h(props.icon as any),
206206
})
207207
}
208208

0 commit comments

Comments
 (0)