Skip to content

robdodson/grunt-svg-merge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-svg-merge

Merge a folder of svg files into a single file

Build Status

Getting Started

This plugin requires Grunt ~0.4.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-svg-merge --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-svg-merge');

Configuration

To configure the task just pass in a src directory, with subfolders for each icon and a dest directory.

svgmerge: {
  files: {
    src: ['icons'],
    dest: 'icons-out'
  }
}

Options

outputSuffix

Default: -out
Type: String

Append a suffix to the end of every output file. Ex: arrow.svg becomes arrow-out.svg.

svgmerge: {
  files: {
    src: ['icons'],
    dest: 'icons-out',
    options: {
      outputSuffix: '-foo'
    }
  }
}

License

Copyright (c) 2014 Rob Dodson. Licensed under the MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published