grunt-svg-data-urls

0.1.2 • Public • Published

grunt-svg-data-urls

Convert SVGs to data urls and uses templates to style output file. Grunt Plugin.

Template allows you to convert the results object and output the results to the destination file.

How to use


svgDataUrls: {

  compile: {
        
    files: {
      src: [
        "test/resources/*.svg"
      ],
      dest: "tmp/test.coffee"
    },

    template: function(results) {
      var fileContents = ""

      results.forEach(function(item) {
        fileContents += item.name +':' + item.dataUrl + ':' + item.filePath
      })

      return fileContents
    }

  }

}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    13
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    13
  • 0.1.1
    1
  • 0.1.0
    1

Package Sidebar

Install

npm i grunt-svg-data-urls

Weekly Downloads

4

Version

0.1.2

License

none

Last publish

Collaborators

  • phoey1