https://github.com/morganconrad/octiclean
Shortens octicon sprite file by keeping only the sprites you want
https://github.com/morganconrad/octiclean
octicon-sprite octicons
Last synced: over 1 year ago
JSON representation
Shortens octicon sprite file by keeping only the sprites you want
- Host: GitHub
- URL: https://github.com/morganconrad/octiclean
- Owner: MorganConrad
- License: mit
- Created: 2016-11-14T02:30:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-14T02:56:37.000Z (over 9 years ago)
- Last Synced: 2025-01-11T14:45:35.151Z (over 1 year ago)
- Topics: octicon-sprite, octicons
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# octiclean
Simple-minded command line program to shorten an [octicon sprite file](https://octicons.github.com/) by keeping only the sprites you want (by id).
## Usage
`node octiclean path-to-sprite.octicons.svg id1 id2 ...`
or a single comma delimited final argument
`node octiclean path-to-sprite.octicons.svg id1,id2 ...`
e.g., to use sprite.octicons.svg in current directory, and keep only bell and chevron-up,
`node octiclean . bell chevron-up`
to keep bell and chevron-up from subdir/myspritefile.svg
`node octiclean subdir/myspritefile.svg bell chevron-up`
### Caveats
1. Logic isn't all that sharp, use with caution
2. If you misspell an id, tough luck - verify your result file!
3. Adds sprite.octicons.svg to the path if it doesn't already end with ".svg"
4. I've done minimal testing, please let me know when you find bugs.