Flint CLI is a simple and efficient tool for managing and converting SVG files in your projects. With Flint, you can quickly convert SVG files to PNGs and watch for changes in your asset folder to automate conversions.
- SVG to PNG Conversion: Convert all SVG files in a folder to PNG format with a single command.
- Watch Mode: Automatically convert SVGs to PNGs whenever changes are detected.
- Customizable input and output paths.
You can install Flint globally using npm:
npm i -g @achyuta-studios/flint
Or, use it locally in your project:
npm i @achyuta-studios/flint --save-dev
Flint provides two main commands: svg-to-png
and watch-svg
.
Convert all SVG files in the input folder to PNG format.
flint svg-to-png [options]
Option | Default | Description |
---|---|---|
-i, --input [path] |
assets_src |
Path to the folder containing SVG files. |
-o, --output [path] |
assets |
Path to save the converted PNG files. |
flint svg-to-png
flint svg-to-png --input svgFolder --output pngFolder
Watch for changes in SVG files and automatically convert them to PNG.
flint watch-svg [options]
Option | Default | Description |
---|---|---|
-i, --input [path] |
assets_src |
Path to the folder containing SVG files. |
-o, --output [path] |
assets |
Path to save the converted PNG files. |
--ignoreInitial [bool] |
true |
Ignore initial file detection when starting the watcher. |
flint watch-svg
flint watch-svg --input svgFolder --output pngFolder --ignoreInitial false