diff --git a/.github/workflows/site-deploy.yml b/.github/workflows/site-deploy.yml index f7bee401..83e472bb 100644 --- a/.github/workflows/site-deploy.yml +++ b/.github/workflows/site-deploy.yml @@ -27,11 +27,11 @@ jobs: env: NODE_OPTIONS: --max_old_space_size=4096 - # - name: build dist and bundle analyzer report - # run: bun run dist - # env: - # ANALYZER: 1 - # NODE_OPTIONS: --max_old_space_size=4096 + - name: build dist and bundle analyzer report + run: bun run compile + env: + ANALYZER: 1 + NODE_OPTIONS: --max_old_space_size=4096 - name: Get version id: publish-version @@ -53,15 +53,15 @@ jobs: source-repo: 'git@github.com:ant-design/x.git' destination-repo: 'git@gitee.com:ant-design/antd-x.git' - # - name: Deploy to Surge (with TAG) - # run: | - # export DEPLOY_DOMAIN=ant-design-x-${{ steps.publish-version.outputs.VERSION }}.surge.sh - # cp report.html ./_site - # bunx surge --project ./_site --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }} + - name: Deploy to Surge (with TAG) + run: | + export DEPLOY_DOMAIN=ant-design-x-${{ steps.publish-version.outputs.VERSION }}.surge.sh + cp report.html ./_site + bunx surge --project ./_site --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }} - # - name: Create Commit Comment - # uses: peter-evans/commit-comment@v3 - # with: - # body: | - # - Documentation site for this release: https://ant-design-x-${{ steps.publish-version.outputs.VERSION }}.surge.sh - # - Webpack bundle analyzer report page: https://ant-design-x-${{ steps.publish-version.outputs.VERSION }}.surge.sh/report.html + - name: Create Commit Comment + uses: peter-evans/commit-comment@v3 + with: + body: | + - Documentation site for this release: https://ant-design-x-${{ steps.publish-version.outputs.VERSION }}.surge.sh + - Webpack bundle analyzer report page: https://ant-design-x-${{ steps.publish-version.outputs.VERSION }}.surge.sh/report.html diff --git a/.github/workflows/size-limit.yml b/.github/workflows/size-limit.yml new file mode 100644 index 00000000..0b04a217 --- /dev/null +++ b/.github/workflows/size-limit.yml @@ -0,0 +1,26 @@ +name: 📦 Size Limit + +on: + pull_request: + types: [opened, synchronize] + +permissions: + issues: write + contents: read + +jobs: + size: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - name: size-limit + uses: ant-design/size-limit-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + package_manager: bun + build_script: compile diff --git a/README-zh_CN.md b/README-zh_CN.md index a68231c7..8b800353 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -55,7 +55,7 @@ pnpm add @ant-design/x 在浏览器中使用 `script` 和 `link` 标签直接引入文件,并使用全局变量 `antdx`。 -我们在 npm 发布包内的 dist 目录下提供了 `antdx.js`、`antdx.min.js` 和 `antdx.min.js.map`。 +我们在 npm 发布包内的 [dist](https://cdn.jsdelivr.net/npm/@ant-design/x@1.0.0/dist/) 目录下提供了 `antdx.js`、`antdx.min.js` 和 `antdx.min.js.map`。 > **强烈不推荐使用已构建文件**,这样无法按需加载,而且难以获得底层依赖模块的 bug 快速修复支持。 diff --git a/README.md b/README.md index 41ed7e59..d5553d3b 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ pnpm add @ant-design/x Add `script` and `link` tags in your browser and use the global variable `antd`. -We provide `antdx.js`, `antdx.min.js`, and `antdx.min.js.map` in the `dist` directory of the npm package. +We provide `antdx.js`, `antdx.min.js`, and `antdx.min.js.map` in the [dist](https://cdn.jsdelivr.net/npm/@ant-design/x@1.0.0/dist/) directory of the npm package. ## 🧩 Atomic Components diff --git a/components/bubble/loading.tsx b/components/bubble/loading.tsx index e4b92265..27d62f93 100644 --- a/components/bubble/loading.tsx +++ b/components/bubble/loading.tsx @@ -4,15 +4,12 @@ interface LoadingProps { prefixCls?: string; } -const Loading: React.FC> = (props) => { - const { prefixCls } = props; - return ( - - - - - - ); -}; +const Loading: React.FC> = ({ prefixCls }) => ( + + + + + +); export default Loading; diff --git a/package.json b/package.json index 915d306d..0e7f88bb 100644 --- a/package.json +++ b/package.json @@ -277,7 +277,7 @@ }, "size-limit": [ { - "path": "./dist/antd-x.min.js", + "path": "./dist/antdx.min.js", "limit": "350 KiB" } ]