Skip to content

Commit

Permalink
Add size limit
Browse files Browse the repository at this point in the history
  • Loading branch information
kristerkari committed Jun 25, 2018
1 parent 3e3d406 commit dfa4bd1
Show file tree
Hide file tree
Showing 5 changed files with 2,168 additions and 37 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ cache:
matrix:
include:
- node_js: '9'
script: npm run test -- --runInBand
script: npm run test -- --runInBand && npm run size
env: CI=tests 9
- node_js: '9'
script: npm test -- --runInBand --coverage
script: npm test -- --runInBand --coverage && npm run size
env: CI=coverage
- node_js: '8'
script: npm run test -- --runInBand
script: npm run test -- --runInBand && npm run size
env: CI=tests 8
- node_js: '6'
script: npm run test -- --runInBand
script: npm run test -- --runInBand && npm run size
env: CI=tests 6
before_install:
- npm install -g npm@latest
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
[![Build Status](https://travis-ci.org/kristerkari/css-viewport-units-transform.svg?branch=master)](https://travis-ci.org/kristerkari/css-viewport-units-transform)
[![Build status](https://ci.appveyor.com/api/projects/status/yurf32v23qawgkmp/branch/master?svg=true)](https://ci.appveyor.com/project/kristerkari/css-viewport-units-transform/branch/master)
[![Coverage Status](https://coveralls.io/repos/github/kristerkari/css-viewport-units-transform/badge.svg?branch=master)](https://coveralls.io/github/kristerkari/css-viewport-units-transform?branch=master)
![Size](https://img.shields.io/bundlephobia/minzip/css-viewport-units-transform.svg)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)

Transform CSS viewport units of a Javascript style object to pixels based on window dimensions.

Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ test_script:
- node --version
- npm --version
- cmd: "npm test"
- cmd: "npm run size"
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"url": "git+https://github.com/kristerkari/css-viewport-units-transform.git"
},
"scripts": {
"size": "npm run build && size-limit",
"prepublish": "npm run build",
"prebuild": "rimraf dist",
"build": "babel src --out-dir dist --ignore src/__tests__,src/__mocks__",
Expand All @@ -47,7 +48,8 @@
"lint-staged": "^7.1.2",
"npmpub": "^3.1.0",
"prettier": "^1.13.3",
"rimraf": "^2.6.2"
"rimraf": "^2.6.2",
"size-limit": "^0.18.3"
},
"lint-staged": {
"*.{js,md,json}": [
Expand All @@ -60,6 +62,12 @@
"singleQuote": false,
"trailingComma": "none"
},
"size-limit": [
{
"limit": "500 B",
"path": "dist/index.js"
}
],
"jest": {
"collectCoverageFrom": [
"src/*.js"
Expand Down

0 comments on commit dfa4bd1

Please sign in to comment.