* Accept icon rather than title in `iconToSlug`
This removes the need in (most of the) calls to this function to
seperately check if there is a custom slug already defined for the icon.
* Rename `titleToSlug` to `getIconSlug`
* Revert unnecessary style change
* Update function documentation
* Keep `titleToSlug` and add `getIconSlug` helper
Unfortunately `this` is not available because we're using arrow syntax
for these functions, but refering to `titleToSlug` through
`module.exports` works fine as well.
* Fix parameter name in `getIconSlug` docs
* Upgrade SVGO to version 2
* Sketch neither supports space after arc flags
* Bump svgo to version 2.0.3 and enable 'reusePaths'
* Improve comment
* Simplify additional plugins list; update svgo script in package.json
* Apply suggestions from review
* Added Hive Blockchain
* Rename hiveblockchain.svg to hive_blockchain.svg
* Add slug for Hive (Blockchain)
Co-authored-by: Michael Smith <michael@app-forge.com.au>
Co-authored-by: Peter Noble <petershaggynoble@gmail.com>
* Add "license" object to the data file JSON schema
* Add license to GNU and GNU social
As an example, based on the discussion in:
https://github.com/simple-icons/simple-icons/issues/1167
* Use `"additionalProperties": false` in JSON schema
... to detect properties in the data file that shouldn't be there.
For more info, see:
https://json-schema.org/understanding-json-schema/reference/object.html
* Update JSON scheme descriptions
* Switch from jsonlint2 to jsonschema
This gives is better support for advanced features of JSON schema.
A couple of clarifications:
- There does exist a jsonschema-cli package, but it is rather limited
and crucially doens't exit with a non-zero exit code if there is an
error. (it is also pretty old and not maintained), hence the custom
script.
- I renamed .jsonlintschema 1) for clarity (lint is no longer accurate)
and 2) the .json extension allows easy imorting in the script and 3)
it adds syntax highlighting.
- The script outputs the number of errors in the end because the output
gets pretty big pretty quickly, this way you can see it easily from
your CLI.
- We could customize how the errors are logged, but I feel that is
beyond this PR.
* Two minor changes
* Use `oneOf` to require URL for custom licenses
The updated configuration allows the `"license"` field to be either
1) a SPDX license, optional with a URL
2) a "custom" license with a required URL
Read more about the "oneOf" feature of jsonschema at:
https://json-schema.org/understanding-json-schema/reference/combining.html#oneof
* Include license field in Contributing Guidelines