Skip to content

Commit

Permalink
build: Add bundlesize to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rkunev committed Jun 17, 2019
1 parent 059b9bb commit ce49f57
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
24 changes: 16 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
version: 2
jobs:
build:
branches:
only: "master"
docker:
- image: circleci/node:8
environment:
## this enables colors in the output
TERM: xterm
working_directory: ~/app
working_directory: ~/project/app
steps:
- checkout
- restore_cache:
keys:
- v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
- v1-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- v1-deps-{{ .Branch }}
- v1-deps
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
key: v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
key: v1-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- ~/.cache
- run: yarn run ci
- node_modules/
- run:
name: Build
command: yarn build
- run:
name: Check Bundle Size
command: yarn bundlesize
- run:
name: Run Tests
command: yarn run ci
- store_artifacts:
path: coverage
- run: curl -s https://codecov.io/bash | bash
- run:
name: Upload Code Coverage
command: curl -s https://codecov.io/bash | bash
16 changes: 14 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,19 @@
"test": "vue-cli-service test:unit",
"lint": "vue-cli-service lint",
"ci": "vue-cli-service test:unit -i --ci -b",
"prepublishOnly": "yarn build"
"prepublishOnly": "yarn build",
"bundlesize": "bundlesize"
},
"bundlesize": [
{
"path": "./dist/vue-color-picker.umd.min.js",
"maxSize": "2.8 kB"
},
{
"path": "./dist/vue-color-picker.min.css",
"maxSize": "1 kB"
}
],
"main": "dist/vue-color-picker.cjs.js",
"module": "dist/vue-color-picker.esm.js",
"unpkg": "dist/vue-color-picker.umd.min.js",
Expand All @@ -35,6 +46,7 @@
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "24.8.0",
"bundlesize": "0.17.2",
"cliui": "5.0.0",
"eslint": "5.16.0",
"eslint-plugin-prettier": "3.1.0",
Expand All @@ -48,7 +60,7 @@
"rollup-plugin-commonjs": "10.0.0",
"rollup-plugin-node-resolve": "5.0.2",
"rollup-plugin-postcss": "2.0.3",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-terser": "5.0.0",
"rollup-plugin-vue": "5.0.0",
"vue": "2.5.21",
Expand Down

0 comments on commit ce49f57

Please sign in to comment.