From 630e183d417ec5cb0683728c901b3590e0e7dcc0 Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Mon, 3 Aug 2015 03:49:10 +0900 Subject: [PATCH] Patch to PNG generation --- README.md | 3 ++- index.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f5d372d..4dbf8ff 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,8 @@ var packer = new IconPacker({ plugins: [ {removeViewBox: false}, // We tend to need this kept around {removeUselessStrokeAndFill: false}, // Can munge graphics - {removeEmptyAttrs: false} // Can be useful to keep around + {removeEmptyAttrs: false}, // Can be useful to keep around + {removeDimensions: true} // Needed for PNGs to work properly ] }, diff --git a/index.js b/index.js index 073df3e..8805008 100644 --- a/index.js +++ b/index.js @@ -76,7 +76,8 @@ var IconPacker = function(options) { plugins: [ {removeViewBox: false}, // See note above ---^ {removeUselessStrokeAndFill: false}, // This can clobber some icons, just leave it. - {removeEmptyAttrs: false} // I find this helpful, others may not. + {removeEmptyAttrs: false}, // I find this helpful, others may not. + {removeDimensions: true} ] }, @@ -376,6 +377,7 @@ IconPacker.prototype.convertSVGtoPNG = function(key, callback) { xml = '', patch = '