Skip to content

Commit 3f7a733

Browse files
committed
Fixed broken SVGO configuration in CLI (closes svg-sprite#199, closes svg-sprite#216)
1 parent 34aa391 commit 3f7a733

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Updated dependencies
33
* Fixed invalid markup in `<defs>` example html ([#229](https://github.com/jkphl/svg-sprite/issues/229))
44
* Fallback for failing CPU detection ([#217](https://github.com/jkphl/svg-sprite/pull/217))
5+
* Fixed broken SVGO configuration in CLI ([#216](https://github.com/jkphl/svg-sprite/pull/216), [#199](https://github.com/jkphl/svg-sprite/issues/199))
56

67
## 1.3.6 Bugfix release (2016-08-29)
78
* Updated dependencies

bin/svg-sprite.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ var _ = require('lodash'),
2424
glob = require('glob'),
2525
SVGSpriter = require('../lib/svg-sprite'),
2626
config = {},
27-
JSONConfig = {mode: {}},
27+
JSONConfig = { mode: {} },
2828
map = {},
2929
yargs = require('yargs')
3030
.usage('Create one or multiple sprites of the given SVG files, optionally along with some stylesheet resources.\nUsage: $0 [options] files')
31-
.version('version', 'Show version number', JSON.parse(fs.readFileSync(path.resolve(__dirname, '..', 'package.json'), {encoding: 'utf8'})).version)
31+
.version('version', 'Show version number', JSON.parse(fs.readFileSync(path.resolve(__dirname, '..', 'package.json'), { encoding: 'utf8' })).version)
3232
.help('help', 'Display this help information')
3333
.wrap(null)
3434
.example('$0 --css --css-render-css --css-example --dest=out assets/*.svg', 'Create a CSS sprite of the given SVG files including example document to the subdirectory "out"')
@@ -223,7 +223,7 @@ if (typeof config.shape.transform === 'string') {
223223
if (('shape-transform-' + transform) in argv) {
224224
try {
225225
var transformConfigFile = argv['shape-transform-' + transform],
226-
transformConfigJSON = fs.readFileSync(path.resolve(transformConfigFile), {encoding: 'utf8'}),
226+
transformConfigJSON = fs.readFileSync(path.resolve(transformConfigFile), { encoding: 'utf8' }),
227227
transformConfig = transformConfigJSON.trim() ? JSON.parse(transformConfigJSON) : {};
228228
this.push(_.zipObject([transform], [transformConfig]));
229229
} catch (e) {

0 commit comments

Comments
 (0)