Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

An experimental SVG sprite generation service prototype

Notifications You must be signed in to change notification settings

i-like-robots/svg-sprite-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVG sprite generator

A experimental SVG sprite generation service prototype.

Setup

# Clone this repo
git clone git@github.com:i-like-robots/svg-sprite-generator.git
cd svg-sprite-generator/

# Install project dependencies
npm install

# For SVG -> PNG conversion use ImageMagick + librsvg
brew install imagemagick --with-librsvg

# or if you have ImageMagick installed already but not librsvg...
brew reinstall imagemagick --with-librsvg

Prepare SVGs

  1. Place individual SVG icon files into source/svg/ folder
  2. Run gulp which will generate a single file in the output/svg/ folder

Run the server

# For development
nodemon server.js

# For production
npm start

Usage

# To view available colors
http://localhost:3000/colors

# To view available icons
http://localhost:3000/icons

# To fetch all icons and default colors
http://localhost:3000/

# To fetch specific icons and specified colors
http://localhost:3000/?colors=000,666,fff&icons=arrow-left,arrow-right,arrow-up,arrow-down

About

An experimental SVG sprite generation service prototype

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published