grunt-svg-merge

0.1.2 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i grunt-svg-merge

Weekly Downloads

1

Version

0.1.2

License

none

Last publish

Collaborators

  • robdodson