Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6d6745e

Browse files
Add size-limit to protect against bloat
1 parent abcc716 commit 6d6745e

File tree

4 files changed

+2518
-144
lines changed

4 files changed

+2518
-144
lines changed

‎.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ cache:
99
matrix:
1010
include:
1111
- node_js: '9'
12-
script: npm run test -- --runInBand
12+
script: npm run test -- --runInBand && npm run size
1313
env: CI=tests 9
1414
- node_js: '9'
15-
script: npm test -- --runInBand --coverage
15+
script: npm test -- --runInBand --coverage && npm run size
1616
env: CI=coverage
1717
- node_js: '8'
18-
script: npm run test -- --runInBand
18+
script: npm run test -- --runInBand && npm run size
1919
env: CI=tests 8
2020
- node_js: '6'
21-
script: npm run test -- --runInBand
21+
script: npm run test -- --runInBand && npm run size
2222
env: CI=tests 6
2323
before_install:
2424
- npm install -g npm@latest

‎appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ test_script:
1616
- node --version
1717
- npm --version
1818
- cmd: "npm test"
19+
- cmd: "npm run size"

‎package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "Match style objects containing CSS Media Queries with React Native",
55
"main": "dist/index.js",
66
"scripts": {
7+
"size": "size-limit",
78
"prepublish": "npm run build",
89
"prebuild": "rimraf dist",
910
"build": "babel src --out-dir dist --ignore src/__tests__,src/__mocks__",
@@ -64,13 +65,20 @@
6465
"lint-staged": "^7.0.4",
6566
"npmpub": "^3.1.0",
6667
"prettier": "^1.12.0",
67-
"rimraf": "^2.6.2"
68+
"rimraf": "^2.6.2",
69+
"size-limit": "^0.18.3"
6870
},
6971
"prettier": {
7072
"semi": true,
7173
"singleQuote": false,
7274
"trailingComma": "none"
7375
},
76+
"size-limit": [
77+
{
78+
"limit": "3 KB",
79+
"path": "src/index.js"
80+
}
81+
],
7482
"jest": {
7583
"collectCoverageFrom": [
7684
"src/*.js"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /