1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-12-16 01:10:30 +02:00
Commit Graph

113 Commits

Author SHA1 Message Date
Eric Cornelissen
7672bfb2db Reduce package size by replacing JSON.stringify (#1519)
* Reduce package size by replacing JSON.stringify by custom stringify func

* Escape icon's title and SVG value

... as pointed out by @birjolaxew, if they contain a "'" it will break 
the resulting object.
2019-07-14 21:15:26 +02:00
Eric Cornelissen
c6a9346985 Generic get icon function for easier access to brands with "difficult" names (#1522)
* Add URL friendy/slug/file name as property to package icon objects

* Test new property

* Build index from template

* Add .get function to index.js export

* Test new .get function in index.js export

* Use Uglify-JS to minify the code in the package's index.js

* Update API in README.md

* Renaem test using "slug" instead of "name"
2019-07-14 21:05:38 +02:00
Eric Cornelissen
9ebc626ab5 Add URL friendy/slugged name as property to package icon objects (#1520)
* Add URL friendy/slug/file name as property to package icon objects

* Test new property

* Add 'name' property to examples in README

* Rename "name" property to "slug"
2019-07-14 20:09:34 +02:00
Eric Cornelissen
39b8fdfa85 Reduce impact of path value on package size (#1521)
* Reduce package size by replacing JSON.stringify by custom stringify func

* Replace path data by getter

* Replace getter by Object.defineProperty

* Remove icon.path definition

* Revert 801c07d4

Apperantly getters have better support then Objct.defineProperty...
2019-07-14 17:07:24 +02:00
Eric Cornelissen
287317b7b6 Lint the SVG's title content (#1508)
* Add custom SVGLint rule to lint the general <title> format

i.e. the <title> should be "[ICON_NAME] icon"

* Check if there exists an entry in simple-icons.json with the icon name

... found in the <title>

* Normalize all icons <title> value

* Fix mismatch between HTML's icon title and simple-icons.json title

... due to HTML special entities (such as `&amp;`). Affected icons:

- AT&T (AT&amp;T)
- Let's Encrypt (Let&apos;s Encrypt)

* Refactor .svglintrc.js

to make the code style more in line with scripts/prepublish.js

* Add SVG with invalid <title> format

* Add SVG with unknown title

* Revert 6912816 and f002504
2019-07-03 23:33:03 +02:00
Eric Cornelissen
01b84bc2c2 Version bump
Bumped the second digit instead of the third to indicate a not backwards 
compatible change: removing the icon named Adobe Lightroom.
2019-06-30 11:55:57 +01:00
Eric Cornelissen
30cd9ecc99 Add "path" key with raw path data to NPM package (#1472)
* Update prepublish script to add path to generated .js files

* Test generated path values

* Fix Furry Network icon

The Furry Network icon used to have "e"s in the path, however the 
official SVG definition does not specify the E command.

source: https://www.w3schools.com/graphics/svg_path.asp
2019-06-15 22:31:23 +02:00
David Klebanoff
1fb7581c55 Handle accented brand names (#1439)
* Handle accented brand names.

* Update order of replacement (alphabetic).
2019-05-28 23:56:20 +02:00
Eric Cornelissen
0794f0186a Add backwards compatability for Adobe Lightroom
Because it was renamed it may result in unexpected errors --> breaking 
changes.

This is a temporary solution to circumvent the problem. This can be 
removed once some other breaking changes are also present and a major 
new version is released. I propose removing this change when 
https://github.com/simple-icons/simple-icons/issues/1362 is implemented
2019-05-03 17:16:52 +03:00
Eric Cornelissen
579d439e60
Lint file formatting (primarily whitespace) (#1349)
* Add editorconfig-checker and .editorconfig

* Fix wslint errors
2019-04-17 12:59:44 +03:00
Aaron Benjamin
038c558fab Add Apple Pay, AT&T, T-Mobile, Sprint, Verizon, Boost, Framer (#973)
* add new icons

- add icon for AT&T
- add icon for T-mobile
- add icon for Sprint
- add icon for Cricket
- add icon for Verizon
- add icon for Boost
- add icon for Framer
- add icon for Sketch
- Update _data/simple-icons.json with new icon data

* remove `<g>` from svg files

- remove `<g>` from svg files to address svglint error

* add apple pay

- Add apple pay
- Update simple-icons.json

* make changes per review

Changes were made based on review 9/9/18.

* fixed AT&T naming
2018-09-11 08:42:29 +02:00
Eric Cornelissen
b339df0b61 Update filemapping, ampersand (#977)
* Replace ampersand to avoid problems with filenames

Together with some examples as test

* Revert filename changes for testing purposes
2018-09-10 17:53:59 +02:00
Johan Fagerberg
6ee6ba977c
Add prepublish script (#942)
* Add prepublish script

Compiles icons into both static js files (icons/{filename}.js) and
into a static index.js. The latter is not tree-shakeable.

Closes #941, closes #751

* Add information on tree-shaking to README

* Remove index.js after publishing

* Change 'prepublish' to 'prepublishOnly'

* Link to webpack in README

* Simplify postpublish cleanup

Thanks @ericcornelissen

* Fix quote usage in prepublish.js

* Fix quote usage in utils.js

* Optimized file size of prepublish output

* Improved readability of prepublish script
2018-08-26 23:23:57 +02:00