[bundlephobia] add badge for the npm package size (#1481)

* Added a shield for calculating npm bundle sizes

* Fix linting errors

* Fixed badges for bundlephobia

* Remove un-required keywords

* Simplified handler based on feedback

* Use isFileSize for validation

* Convert camel-cased error codes to space separated ones

* Updated error format

* Fixed error formatting

* Renamed gzip to minzip

* Fixes lint error

* Remove test that times out

* refactor tests to make it more readable

* meaningless change

* use trim
This commit is contained in:
Tomek Łaziuk
2018-02-03 17:31:10 +01:00
committed by Paul Melnikow
parent cbb263b102
commit 8ad176d014
3 changed files with 147 additions and 0 deletions

View File

@@ -781,6 +781,20 @@ const allBadgeExamples = [
'node'
]
},
{
title: 'npm bundle size (minified)',
previewUri: '/bundlephobia/min/react.svg',
keywords: [
'node'
]
},
{
title: 'npm bundle size (minified + gzip)',
previewUri: '/bundlephobia/minzip/react.svg',
keywords: [
'node'
]
},
{
title: 'node',
previewUri: '/node/v/passport.svg',