mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
📦 bundlesize support
This commit is contained in:
@@ -3,7 +3,7 @@ version: 2
|
||||
references:
|
||||
container_config: &container_config
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
- image: circleci/node:10
|
||||
working_directory: ~/ant-design
|
||||
|
||||
attach_workspace: &attach_workspace
|
||||
@@ -97,6 +97,7 @@ jobs:
|
||||
- *attach_workspace
|
||||
- run: npm run dist
|
||||
- run: node ./tests/dekko/dist.test.js
|
||||
- run: npm run bundlesize
|
||||
- persist_to_workspace:
|
||||
root: ~/ant-design
|
||||
paths:
|
||||
|
||||
11
package.json
11
package.json
@@ -117,6 +117,7 @@
|
||||
"bisheng-plugin-description": "^0.1.4",
|
||||
"bisheng-plugin-react": "^1.0.0",
|
||||
"bisheng-plugin-toc": "^0.4.4",
|
||||
"bundlesize": "^0.18.0",
|
||||
"chalk": "^2.4.2",
|
||||
"cross-env": "^5.2.0",
|
||||
"css-split-webpack-plugin": "^0.2.6",
|
||||
@@ -211,6 +212,7 @@
|
||||
"sort-api": "antd-tools run sort-api-table",
|
||||
"api-collection": "antd-tools run api-collection",
|
||||
"dist": "antd-tools run dist",
|
||||
"bundlesize": "bundlesize",
|
||||
"compile": "antd-tools run compile",
|
||||
"tsc": "tsc",
|
||||
"start": "rimraf _site && mkdir _site && node ./scripts/generateColorLess.js && cross-env NODE_ENV=development bisheng start -c ./site/bisheng.config.js",
|
||||
@@ -242,5 +244,12 @@
|
||||
"Firefox ESR",
|
||||
"> 1%",
|
||||
"ie >= 9"
|
||||
]
|
||||
],
|
||||
"bundlesize": [{
|
||||
"path": "./dist/antd.min.js",
|
||||
"maxSize": "540 kB"
|
||||
}, {
|
||||
"path": "./dist/antd.min.css",
|
||||
"maxSize": "60 kB"
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
npm run lint && \
|
||||
npm run dist && \
|
||||
npm run bundlesize && \
|
||||
node ./tests/dekko/dist.test.js && \
|
||||
LIB_DIR=dist npm test && \
|
||||
npm run compile && \
|
||||
|
||||
Reference in New Issue
Block a user