From b6fbd7e9d948c5f2420922dac5adb17d4aa5f78c Mon Sep 17 00:00:00 2001 From: Alexander Slansky Date: Wed, 19 Feb 2014 09:53:11 +0100 Subject: [PATCH] fixes #1 --- lib/css-sprite.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/css-sprite.js b/lib/css-sprite.js index 85b9079..e754d5d 100644 --- a/lib/css-sprite.js +++ b/lib/css-sprite.js @@ -28,7 +28,7 @@ module.exports = function (opt) { var queue = function (img) { sprites.push({ 'img': (!opt.base64) ? img : null, - 'name': replaceExtension(file.relative, ''), + 'name': replaceExtension(file.relative, '').replace(/\/|\\/g, '-'), 'x': (!opt.base64) ? (opt.orientation === 'vertical' ? opt.margin : ctxWidth + opt.margin) : 0, 'y': (!opt.base64) ? (opt.orientation === 'vertical' ? ctxHeight + opt.margin: opt.margin) : 0, 'width': img.width, diff --git a/package.json b/package.json index c95c38c..c0d8816 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "css-sprite", - "version": "0.6.1", + "version": "0.6.2", "description": "css sprite generator", "license": "MIT", "repository": {