icon-gen
Advanced tools
Comparing version 1.2.2 to 1.2.3
# ChangeLog | ||
## v1.2.3 | ||
### Bug Fixes | ||
* Fix generating icons without specifying sizes [#94](https://github.com/akabekobeko/npm-icon-gen/pull/94) by [doug-a-brunner (Doug Brunner)](https://github.com/doug-a-brunner) | ||
## v1.2.2 | ||
@@ -35,3 +41,3 @@ | ||
* add sizes option to define witch size of png to include [#62](https://github.com/akabekobeko/npm-icon-gen/pull/62) by.[beijaflor (sho otani)](https://github.com/beijaflor) | ||
* add sizes option to define witch size of png to include [#62](https://github.com/akabekobeko/npm-icon-gen/pull/62) by [beijaflor (sho otani)](https://github.com/beijaflor) | ||
@@ -42,3 +48,3 @@ ## v1.1.3 | ||
* Close a write stream [#57](https://github.com/akabekobeko/npm-icon-gen/pull/57) by.[satorf](https://github.com/satorf) | ||
* Close a write stream [#57](https://github.com/akabekobeko/npm-icon-gen/pull/57) by [satorf](https://github.com/satorf) | ||
* Close stream explicitly [#58](https://github.com/akabekobeko/npm-icon-gen/issues/58) | ||
@@ -57,3 +63,3 @@ | ||
* Using the Babel and change structure of project [#55](https://github.com/akabekobeko/npm-icon-gen/issues/55) | ||
* Add ICNS Retina support [#52](https://github.com/akabekobeko/npm-icon-gen/pull/52) by.[quanglam2807 (Quang Lam)](https://github.com/quanglam2807) | ||
* Add ICNS Retina support [#52](https://github.com/akabekobeko/npm-icon-gen/pull/52) by [quanglam2807 (Quang Lam)](https://github.com/quanglam2807) | ||
* **Drop the Node v4 (Breaking change)** [#51](https://github.com/akabekobeko/npm-icon-gen/issues/51) | ||
@@ -76,3 +82,3 @@ | ||
* Update uuid to version 3.0.0 [#45](https://github.com/akabekobeko/npm-icon-gen/pull/45) by.[marcbachmann (Marc Bachmann)](https://github.com/marcbachmann) | ||
* Update uuid to version 3.0.0 [#45](https://github.com/akabekobeko/npm-icon-gen/pull/45) by [marcbachmann (Marc Bachmann)](https://github.com/marcbachmann) | ||
@@ -88,3 +94,3 @@ ## 1.0.6 | ||
* Icns not working [#42](https://github.com/akabekobeko/npm-icon-gen/issues/42) | ||
* Fix icns generation [#43](https://github.com/akabekobeko/npm-icon-gen/pull/43) by.[mifi (Mikael Finstad)](https://github.com/mifi) | ||
* Fix icns generation [#43](https://github.com/akabekobeko/npm-icon-gen/pull/43) by [mifi (Mikael Finstad)](https://github.com/mifi) | ||
@@ -95,3 +101,3 @@ ## 1.0.5 | ||
* Correct default for `options.type` [#39](https://github.com/akabekobeko/npm-icon-gen/pull/39) by.[atdrago (Adam Drago)](https://github.com/atdrago) | ||
* Correct default for `options.type` [#39](https://github.com/akabekobeko/npm-icon-gen/pull/39) by [atdrago (Adam Drago)](https://github.com/atdrago) | ||
@@ -98,0 +104,0 @@ ## 1.0.4 |
@@ -106,3 +106,3 @@ 'use strict'; | ||
const images = IconGenerator._getRequiredImageSizes(options.modes, options.sizes).map(size => { | ||
const images = IconGenerator._getRequiredImageSizes(options).map(size => { | ||
return _path2.default.join(pngDirPath, size + '.png'); | ||
@@ -136,15 +136,15 @@ }).map(path => { | ||
static _getRequiredImageSizes(modes, sizes) { | ||
if (!sizes) { | ||
return _pngGenerator2.default.getRequiredImageSizes(modes); | ||
static _getRequiredImageSizes(options) { | ||
if (!options.sizes) { | ||
return _pngGenerator2.default.getRequiredImageSizes(options); | ||
} | ||
let imageSizes = []; | ||
modes.forEach(mode => { | ||
if (sizes[mode]) { | ||
imageSizes = imageSizes.concat(sizes[mode]); | ||
options.modes.forEach(mode => { | ||
if (options.sizes[mode]) { | ||
imageSizes = imageSizes.concat(options.sizes[mode]); | ||
} | ||
}); | ||
return 0 < imageSizes.length ? imageSizes : _pngGenerator2.default.getRequiredImageSizes(modes); | ||
return 0 < imageSizes.length ? imageSizes : _pngGenerator2.default.getRequiredImageSizes(options); | ||
} | ||
@@ -151,0 +151,0 @@ |
{ | ||
"name": "icon-gen", | ||
"description": "Generate an icon files from the SVG or PNG files", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"author": "akabeko (http://akabeko.me/)", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
66665