svgo_cli 1.2.0 copy "svgo_cli: ^1.2.0" to clipboard
svgo_cli: ^1.2.0 copied to clipboard

Command-line interface for SVGO - a tool for optimizing SVG files. Port of the popular Node.js SVGO optimizer.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.2.0 - 2025-12-09 #

Added #

  • Configuration file support with priority loading:
    • Explicit config via --config <FILE> flag
    • svgo.yaml in current directory
    • svgo.yml in current directory
    • svgo: key in pubspec.yaml
  • Full plugin enable/disable support via configuration
  • Complete plugin parameter configuration support
  • --no-config flag to disable automatic config file loading
  • SvgoFileConfig class for programmatic configuration loading
  • PluginConfig class for plugin configuration representation
  • loadConfig() and loadConfigFromFile() utility functions
  • Comprehensive unit tests for configuration system

Changed #

  • CLI now supports all output formatting options (pretty, indent, eol, finalNewline, useShortTags)
  • Improved error handling and warning messages for unknown plugins/options

1.1.0 - 2025-12-08 #

Changed #

  • Updated to use svgo 1.1.0 with type-safe plugin API
  • Internal plugin configuration now uses type-safe API

1.0.0 - 2025-12-06 #

Added #

  • Initial release of SVGO CLI
  • Command-line interface for SVG optimization
  • Single file and batch processing support
  • Glob pattern support for file matching
  • Output directory option (-o, --output)
  • Recursive directory processing (-r, --recursive)
  • Multipass optimization mode (-m, --multipass)
  • Configurable float precision (-p, --precision)
  • Quiet mode for scripting (-q, --quiet)
  • Version and help commands
  • Progress and summary output
  • Byte savings statistics

Usage Examples #

# Optimize a single file
svgo input.svg

# Optimize to output directory
svgo -o dist input.svg

# Batch processing with glob
svgo "src/**/*.svg"

# Multipass with custom precision
svgo -m -p 2 input.svg

[Unreleased] #

Planned #

  • Stdin/stdout support
  • Watch mode for development
  • Parallel processing for large batches
1
likes
160
points
164
downloads

Publisher

verified publisherfluttercandies.com

Weekly Downloads

Command-line interface for SVGO - a tool for optimizing SVG files. Port of the popular Node.js SVGO optimizer.

Repository (GitHub)
View/report issues

Topics

#svg #cli #optimization #command-line #tools

Documentation

API reference

License

MIT (license)

Dependencies

args, glob, path, svgo, yaml

More

Packages that depend on svgo_cli