Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: revamp readme #1835

Merged
merged 1 commit into from
Nov 14, 2023
Merged

chore: revamp readme #1835

merged 1 commit into from
Nov 14, 2023

Conversation

SethFalco
Copy link
Member

@SethFalco SethFalco commented Nov 14, 2023

Revamps the README to tidy things up, reference the new documentation, and drop some unmaintained or deprecated ways to use SVGO.

Hero

I changed the alt attribute of the hero image because it wasn't fulfilling it's purpose. The alt attribute is what should be used instead if the user is unable to see the image for whatever reason. However, this image is purely decorative and so can be skipped over in the scenario it doesn't load.

See: https://www.w3.org/WAI/tutorials/images/decision-tree/

Shields

Adds a badge guiding users to the SVGO documentation. I also modified the alt to match the text we'd expect to see if the badge loaded.

Content

  • Proofread the README, revising grammar and making some subjective changes.
  • SVG is an acronym, so all uppercase. (svgSVG)
  • Reduce verbosity in general, particularly when describing the config.
  • Instead of displaying the plugin list in a table here, link to the SVGO documentation.

Troubleshooting

I've dropped the troubleshooting section, as caveats of SVGO and each plugin are explained in the documentation. The particular example with removeViewBox has also been covered to hell across mediums.

Ways to use SVGO

I've deleted some entries, either due to planned deprecation, or because it still uses SVGO v0 or SVGO v1.

I will be working with third-party tools to try to get everyone upgraded to SVGO v3, but once we have released SVGO v4, I would like to remove tools still on SVGO v2 from this list as well.

  • SVGO Action - planned deprecation
  • mimosa-minify-svg - SVGO pre-v2 and unmaintained
  • svgo-osx-folder-action - Repo is archived
  • svgo_bot - SVGO pre-v2 and unmaintained
  • Image Shrinker - SVGO pre-v2 and unmaintained

@SethFalco SethFalco force-pushed the chore/health-files branch 2 times, most recently from 477811a to 01ef6dd Compare November 14, 2023 16:05
@SethFalco SethFalco merged commit 0e5f0f1 into svg:main Nov 14, 2023
6 checks passed
```sh
# npm
npm install -g svgo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These days npx, yarn dlx or pnpx are more popular ways to run something globally.

Copy link
Member Author

@SethFalco SethFalco Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the quick merge! I should've left this open clearly. ^-^'

I actually opted for the individual commands intentionally because while looking npx, I've found it's very slow. This checks out with the fact that typically when I see it, it's for running one-time tasks like create-react-app.

Every time one does npx svgo, it will check through node modules etc, taking 2 seconds just to run npx svgo --help. Not the ideal UX, so I thought it'd be best to document them separately, which is also handy to explain how to depend on it in a Node.js project anyway.


SVGO reads the configuration from `svgo.config.js` or the `--config {{path/to/config.js}}` command-line option. Some other parameters can be configured though command-line options too.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{{}} is a bit confusing for non dev, maybe not really necessary

Copy link
Member Author

@SethFalco SethFalco Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I just borrowed the syntax from tldr-pages.
I'll update this locally and include it as a chore in my next PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants