Commit Graph

11 Commits

Author SHA1 Message Date
Pierre-Yves B
f1007a5ee2 Remove duplicate normalizeColor calls (#5534)
* Remove duplicate normalizeColor calls

* Clarify behaviour with comment
2020-09-13 22:11:22 +02:00
Pierre-Yves B
bf4fd96059 Remove camelcase dependency from badge-maker package (#5533) 2020-09-13 09:17:07 +02:00
Pierre-Yves B
06dff040c6 Rework isCSSColor check (#5508)
* Rework isCSSColor check

* Expand tests and accept strings with whitespace

* Remove void(0) edge-case test
2020-09-12 12:04:41 +02:00
Pierre-Yves B
471f3f4ad1 Use black font when background color is too light (#5467)
* Use black font when background color is too light

* Tweak dark color

* Extract magic brightness numbers to constants

* Fix snapshot tests

* Switch threshold to 0.69
2020-09-07 19:07:28 +02:00
Evelyn Hathaway
c1ded757c7 feat: add accessible text alternative in when a graphic and link (#5289)
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2020-07-13 20:07:26 +01:00
chris48s
c03a73b573 v3 stable (#5037)
* fix outdated docblock
* 3.0.0
2020-05-06 19:51:21 +01:00
chris48s
13d75e0607 upgrade to prettier 2 (#5051)
* arrowParens: avoid
* remove trailingComma setting
2020-05-05 21:07:43 +01:00
Makarenko Anton
6ca2fa0c89 Fix rendering in Firefox on Windows (#5038)
Close #4813
2020-05-04 20:01:15 -04:00
chris48s
17374873ad fix link width params (#4991)
closes #4989

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-05-01 20:55:57 +00:00
chris48s
d8840b83e7 fix logo placement with custom logoWidth value (#4946) 2020-04-25 16:34:34 +01:00
chris48s
3ba05cb184 📦 version 3 (#4756)
* Validate input to BadgeFactory.create() (#3875)

* validate input to create()

* remove deprecated properties (#3881)

* remove BadgeFactory class (#3884)

* Template literal templates (#4459)

- Remove use of the doT template library and move to generating SVG output using javascript template literals.
- Drop SVGO and mostly manually implement the optimisations.
- Add a bunch more tests

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>

* drop raster support in package CLI (#4523)

* drop raster support in package CLI
* update docs

* rename gh-badges package to badge-maker

* rename gh-badges dir to badge-maker

* update relative imports and other refs to in parent dir

'gh-badges' --> 'badge-maker'

* update snyk service tests

This change is only tangentially related

We've used the shields repo as an example for these tests so
moving files around in our repo has a knock-on effect on them

* add missing type hints to dev style page

* write the changelog/migration guide for v3

* use extension in README CLI example

* update CLI help

whoops - missed this in #4523

* bump version

* update for self-hosting users

* README updates

* drop .format param from CLI, always output SVG

* Change text[] to label and message, Remove JSON output

- Change text[] to label and message
- Fix message only badge
- Remove JSON output format
- Update the docs

* update package-lock

* rename 'template' to 'style'

* handle invalid styles in coalesceBadge

* ensure makeBadge is passed a string for template in coalesceBadge()

issue #4925

* fix (logo/no label text/label color specified) case

issue #4926

* add example of (logo/no label text/label color specified) to style debug page

* update type defs

* padding fix for FTB style

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
2020-04-23 20:05:48 +01:00