Socket
Socket
Sign inDemoInstall

icon-gen

Package Overview
Dependencies
5
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.4 to 1.1.5

6

CHANGELOG.md
# ChangeLog
## v1.1.5
### Bug Fixes
* Fail if the `sizes` option is not specified [#66](https://github.com/akabekobeko/npm-icon-gen/issues/66)
## v1.1.4

@@ -4,0 +10,0 @@

17

dist/lib/icon-generator.js

@@ -158,3 +158,3 @@ 'use strict';

path = _path2.default.join(dir, options.names.ico + '.ico');
const icoImageFilter = options.sizes['ico'] || _icoGenerator.ICO.imageSizes;
const icoImageFilter = IconGenerator.getSizes(_icoGenerator.ICO.imageSizes, options, 'ico');
tasks.push(_icoGenerator2.default.generate(IconGenerator.filter(images, icoImageFilter), path, logger));

@@ -165,3 +165,3 @@ break;

path = _path2.default.join(dir, options.names.icns + '.icns');
const icnsImageFilter = options.sizes['ico'] || _icnsGenerator.ICNS.imageSizes;
const icnsImageFilter = IconGenerator.getSizes(_icnsGenerator.ICNS.imageSizes, options, 'icns');
tasks.push(_icnsGenerator2.default.generate(IconGenerator.filter(images, icnsImageFilter), path, logger));

@@ -189,2 +189,15 @@ break;

/**
* Get the icon sizes.
*
* @param {Array.<Number>} defaltSizes Sizes of the defalt.
* @param {Object} options CLI options.
* @param {String} type Type of the icon, 'ico' or 'icns'.
*
* @return {Array.<Number>} Sizes.
*/
static getSizes(defaltSizes, options, type) {
return options && options.sizes && options.sizes[type] ? options.sizes[type] : defaltSizes;
}
/**
* Filter by size to the specified image informations.

@@ -191,0 +204,0 @@ *

2

package.json
{
"name": "icon-gen",
"description": "Generate an icon files from the SVG or PNG files",
"version": "1.1.4",
"version": "1.1.5",
"author": "akabeko (http://akabeko.me/)",

@@ -6,0 +6,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc