* Restructure scripts/ directory
And update references to this scripts everywhere.
* Update names of file-level constants in bump-version.js
* Normalize quotes between all scripts
* Move "create-release.yml" scripts to scripts/release
* Move slugs table script to scripts/release
* Update relative path logic in update-slugs-table.js
* Implement better linter error handling; fix error in 'collinear-segments' lint rule
* Revert changes
* Fix error with resolution tips
* Fix lint error
* Fix minor errors
* Increase performance bumping svg-path-segments version
* Minor change in function name and bump svg-path-segments to 0.1.5
* Update function doc
* Remove 'segmentsSVGPath' function and update functions documentation
* Fix error in index number
* Fix automatic collinear segment
* 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
* 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
* Remove .travis.yml reference from .gitattributes
* Minor refactoring of .svglintrc.js
- Remove unused variables
- Fix missing semi-colons
- Remove unneeded indentation
* Prevent error in clean command due to missing files
* Fix indentations
* Further improvements to Editorconfig and indentation
* Format YAML files
- Update indentation for array notation
- Normalize use of newlines
* Add test for check JSON data file prettification
* Move prettification test to out linting script
* Add other newline in error message to improve readability
* Invert the diff to show the solution to the user
* Add 'jest-diff' as direct dependency
* Remove annotations and colors
* Replace CRLF newlines with LFs in JSON prettification lint
* Restore colors in JSON prettification lint
* Check outlying precision while running linter
* Prevent reduce error on empty array
* Rebase on branch develop
* Add svgpath dep
* Improve decimal precision verification
* Check outlying precision while running linter
* Prevent reduce error on empty array
* Fix ignored file
* Fix reverted dep version
* Check decimal according to review proposal
* Pin svgpath version
* Use te maximum precision only
* Run linter again
* Fix uglify-js version
* Add supported engines to package.json
* Improve message
* Revert engines and use version check in linter
* Move function
* Update node version to 12 in Travis
* Add skip ignored
* Add linter to check svg path dimensions
Float precision is set at 3 which is the default for svgo in .svgo.yml;
precision can be raised over time.
This adds an ignore file with the current paths of non-conforming icons.
This also changes the name of the icon title linter as well so it reads
more nicely than "custom".
* Update CONTRIBUTING GUIDELINES
Add a note on visual imperfections and viewbox problems due to
optimizing.
Co-authored-by: Eric Cornelisesn <ericornelissen@gmail.com>
Co-authored-by: Peter Noble <PeterShaggyNoble@users.noreply.github.com>
* Update all dependencies
* Update NodeJS version for Travis to 10
Starting from v26.0.0 of Jest [1] a function native to NodeJS 10 is
being used, therefore using NodeJS 8 in Travis CI is no longer
sufficient.
--
1. https://github.com/facebook/jest/blob/master/CHANGELOG.md#2600
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com>
* Avoid to insert a final newline on '_data/simple-icons.json' file config for '.editorconfig'.
* Fix wslint script, add final newline to simple-icons.json and revert .editorconfig configuration.
* Create simple CLI tool to get the filename from a brandname
https://github.com/simple-icons/simple-icons/pull/2589#issuecomment-585902427
* Update contributing guidelines on new SVGs' filenames
* Fix incorrect filename in package.json script
* Add file header to get-filename script
* Update contributing guidelines' section on SVG filenames
Co-Authored-By: YoussefRaafatNasry <youssefraafatnasry@gmail.com>
* Add a script for the linting that cannot be accomplished by our other linters
Currently this only contains linting for whether our icons are alphabetically sorted
* Add our own linting to Travis
* Fix Let's Encrypt being incorrectly sorted
* Intentionally break sorting to test CI
* Revert "Intentionally break sorting to test CI"
This reverts commit 55e4070b3c3294cff306fcc138ce247843130c35.
* Explain in CONTRIBUTION.md how to sort metadata
* Update all dependencies
* Explicitly ignore .svg files with wslint
Continuing on https://github.com/simple-icons/simple-icons/pull/1682,
required because of an update to editorconfig-checker in
b14e46c462e064f3dc1d09f18107e566dda8db51
* Introduce newline into a SVG
for testing purposes
* Remove potential newlines from SVGs when building the package
* Don't lint SVG files
... so it is neither required to have, or not have, a final newline
* Remove both Windows and Unix style newlines in build script
* Rever 3372ca3
* Add SVGO as devDependencies and a NPM script to run it
* Update Contributing Guidelines
Change the instructions on how to use SVGO to optimize SVGs to use the
new dependency and NPM script.
* Add configuration for the NPM command to optimize SVGs
* Specify --precision in SVGO configuration file
* Update SVGO config ordering of attributes
To be in line with the fact that, as @davidklebanoff pointed out: "most
(all?) have the attributes in the order of role, viewbox, xmlns
(alphabetical)"
* Move SVGO --multipass argument to .svgo.yml
* Update SVGO dependency to 1.3.0
Now the force merge option works 🎉
See: https://github.com/svg/svgo/releases/tag/v1.3.0
* Update outdated "blocking" comment
* 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"
* Update editorconfig-checker dependency
At least v2.0.7 [1] is required to check that a file does not contain a
final newline.
--
1.
https://github.com/editorconfig-checker/editorconfig-checker.javascript/releases/tag/2.0.7
* Add *.svg to editorconfig and enable checking in editorconfig-checker
* Remove final newline from existing SVG files
... to fix the `$ npm run wslint` command
* Remove xmlstarlet from Travis CI "Lint" build
With https://github.com/birjolaxew/svglint/pull/6 merged some time ago,
we no longer need xmlstarlet to verify that SVGs are valid XML.
Essentially reverting the changes in #1112 and #1159
This should also make it easier for contributors to reproduce the build
on their own machines, specifically if they don't use Linux.
* Update dependencies
* Change "license" in package.json to SPDX format
Fixes the "npm WARN simple-icons@1.9.19 license should be a valid SPDX
license expression" warning given by NPM.
* Implement basic test for the NPM package
Just an initial test suite that checks if all promised imports actually
exist. The testing framework Jest was chosen because of it ease of setup
and use.
* Implement exhaustive tests of properties for each icon
* 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
* Added SVGLint
* Added SVGLint to CI
* Upgraded Node version used by CI
* Upgraded SVGLint to latest version
* Moved SVGLint configuration file
* Upgraded SVGLint
1.0.1 -> 1.0.2
Adds support for globs on Windows
* Added SVGLint check for aria-labelledby and title ID