偏右
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
19 additions and
22 deletions
-
.github/workflows/compressed-size.yml
-
components/config-provider/__tests__/locale.test.js
-
package.json
-
webpack.config.js
|
|
@ -0,0 +1,16 @@ |
|
|
|
name: 📦 Compressed Size |
|
|
|
|
|
|
|
on: [pull_request] |
|
|
|
|
|
|
|
jobs: |
|
|
|
build: |
|
|
|
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
env: |
|
|
|
CI_JOB_NUMBER: 1 |
|
|
|
|
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- uses: preactjs/compressed-size-action@v2 |
|
|
|
with: |
|
|
|
repo-token: "${{ secrets.GITHUB_TOKEN }}" |
|
|
@ -143,7 +143,7 @@ describe('ConfigProvider.Locale', () => { |
|
|
|
const wrapper = wrapperComponent({ validateMessages: { required: '必须' } }); |
|
|
|
|
|
|
|
wrapper.find('form').simulate('submit'); |
|
|
|
await delay(50); |
|
|
|
await delay(200); |
|
|
|
wrapper.update(); |
|
|
|
|
|
|
|
expect(wrapper.find('.ant-form-item-explain').first().text()).toEqual('必须'); |
|
|
|
|
|
@ -2,6 +2,7 @@ |
|
|
|
"name": "antd", |
|
|
|
"version": "4.5.1", |
|
|
|
"description": "An enterprise-class UI design language and React components implementation", |
|
|
|
"title": "Ant Design", |
|
|
|
"keywords": [ |
|
|
|
"ant", |
|
|
|
"component", |
|
|
@ -154,7 +155,6 @@ |
|
|
|
"@ant-design/hitu": "^0.0.0-alpha.13", |
|
|
|
"@ant-design/tools": "^10.0.1", |
|
|
|
"@qixian.cs/github-contributors-list": "^1.0.3", |
|
|
|
"@relative-ci/agent": "^1.3.0", |
|
|
|
"@stackblitz/sdk": "^1.3.0", |
|
|
|
"@types/classnames": "^2.2.8", |
|
|
|
"@types/enzyme": "^3.10.5", |
|
|
@ -181,7 +181,6 @@ |
|
|
|
"bisheng-plugin-description": "^0.1.4", |
|
|
|
"bisheng-plugin-react": "^1.1.0", |
|
|
|
"bisheng-plugin-toc": "^0.4.4", |
|
|
|
"bundle-stats-webpack-plugin": "^2.2.0", |
|
|
|
"bundlesize": "^0.18.0", |
|
|
|
"chalk": "^4.0.0", |
|
|
|
"cheerio": "^1.0.0-rc.3", |
|
|
@ -309,6 +308,5 @@ |
|
|
|
], |
|
|
|
"tnpm": { |
|
|
|
"mode": "npm" |
|
|
|
}, |
|
|
|
"title": "Ant Design" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
@ -52,21 +52,6 @@ function injectWarningCondition(config) { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function addBundleStatsWebpackPlugin(config) { |
|
|
|
if (!process.env.CIRCLECI || process.env.RUN_ENV !== 'PRODUCTION') { |
|
|
|
return; |
|
|
|
} |
|
|
|
// eslint-disable-next-line global-require
|
|
|
|
const { BundleStatsWebpackPlugin } = require('bundle-stats-webpack-plugin'); |
|
|
|
// eslint-disable-next-line global-require
|
|
|
|
const { RelativeCiAgentWebpackPlugin } = require('@relative-ci/agent'); |
|
|
|
config.plugins.push(new BundleStatsWebpackPlugin()); |
|
|
|
|
|
|
|
if (config.entry['antd.min']) { |
|
|
|
config.plugins.push(new RelativeCiAgentWebpackPlugin()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function processWebpackThemeConfig(themeConfig, theme, vars) { |
|
|
|
themeConfig.forEach(config => { |
|
|
|
ignoreMomentLocale(config); |
|
|
@ -124,8 +109,6 @@ if (process.env.RUN_ENV === 'PRODUCTION') { |
|
|
|
reportFilename: '../report.html', |
|
|
|
}), |
|
|
|
); |
|
|
|
|
|
|
|
addBundleStatsWebpackPlugin(config); |
|
|
|
}); |
|
|
|
|
|
|
|
processWebpackThemeConfig(webpackDarkConfig, 'dark', darkVars); |
|
|
|