Skip to content

Commit 35166d9

Browse files
authored
Merge pull request #47 from nfl/issue/46
(feat) add bundlesize to npm scripts
2 parents 7481c4d + 64e3071 commit 35166d9

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

package.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"lib"
3333
],
3434
"dependencies": {
35+
"bundlesize": "^0.14.4",
3536
"debounce": "^1.0.0",
3637
"deep-equal": "^1.0.1",
3738
"eventemitter3": "^2.0.2",
@@ -89,12 +90,18 @@
8990
"webpack-dev-middleware": "^1.5.1",
9091
"webpack-dev-server": "^1.14.1"
9192
},
93+
"peerDepencencies": {
94+
"prop-types": "^15.5.10",
95+
"react": "^15.0.1",
96+
"react-dom": "^15.0.1"
97+
},
9298
"scripts": {
9399
"commit": "git-cz",
94100
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
95101
"build": "npm run clean && npm run compile",
96102
"build:umd": "NODE_ENV=development webpack src/index.js dist/react-gpt.js",
97103
"build:umd:min": "NODE_ENV=production webpack -p src/index.js dist/react-gpt.min.js",
104+
"bundlesize": "npm run build:umd:min && bundlesize",
98105
"clean": "rimraf lib coverage",
99106
"compile": "babel src --out-dir lib",
100107
"examples": "webpack-dev-server --config examples/webpack.config.js --content-base examples/apps --inline",
@@ -109,5 +116,11 @@
109116
"commitizen": {
110117
"path": "./node_modules/cz-conventional-changelog"
111118
}
112-
}
119+
},
120+
"bundlesize": [
121+
{
122+
"path": "./dist/react-gpt.min.js",
123+
"maxSize": "8.5 kB"
124+
}
125+
]
113126
}

0 commit comments

Comments
 (0)