-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
I'm always frustrated when I need to manually run svgpack every time I add or modify SVG files during development. This breaks the development flow.
Describe the solution you'd like
Add a --watch flag that monitors the SVG directory and automatically regenerates the CSS output on file changes.
svgpack src/assets/svg > output.css --mask --background --watchThe watch mode should:
- Monitor the source directory for SVG changes (add/modify/delete)
- Auto-regenerate output on changes
- Handle errors without stopping
Describe alternatives you've considered
Using external watchers like nodemon or chokidar-cli:
{
"scripts": {
"watch:svg": "nodemon --watch src/assets/svg --ext svg --exec npm run build:svg"
}
}This works but requires extra dependencies.
Additional context
Would align svgpack with other build tools (Tailwind, TypeScript, PostCSS) that have native watch modes. Could use chokidar for the implementation.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request