svgo_cli 1.2.0
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.yamlin current directorysvgo.ymlin current directorysvgo:key inpubspec.yaml
- Explicit config via
- Full plugin enable/disable support via configuration
- Complete plugin parameter configuration support
--no-configflag to disable automatic config file loadingSvgoFileConfigclass for programmatic configuration loadingPluginConfigclass for plugin configuration representationloadConfig()andloadConfigFromFile()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