New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-responsive-images

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-responsive-images - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

tmp/animated/cat_fun-320.gif

2

package.json
{
"name": "grunt-responsive-images",
"description": "Produce images at different sizes for responsive websites.",
"version": "0.1.4",
"version": "0.1.5",
"homepage": "https://github.com/andismith/grunt-responsive-images",

@@ -6,0 +6,0 @@ "author": {

@@ -328,2 +328,10 @@ # grunt-responsive-images [![NPM version](https://badge.fury.io/js/grunt-responsive-images.png)](http://badge.fury.io/js/grunt-responsive-images)

*0.1.5*
* Test files are no longer take up disk space.
* Improved error handling for isAnimated.
* Fixed Travis-CI build dependencies
* Files can change format
* Come with me if you want to live
*0.1.4*

@@ -330,0 +338,0 @@

@@ -59,4 +59,4 @@ /**

alternative: {
code: 'gm',
name: 'GraphicsMagick'
code: 'gm',
name: 'GraphicsMagick'
}

@@ -69,4 +69,4 @@ },

alternative: {
code: 'im',
name: 'ImageMagick'
code: 'im',
name: 'ImageMagick'
}

@@ -281,3 +281,3 @@ }

// data.Delay and Scene can identify an animation GIF
if (!tryAnimated && data.format.toUpperCase() === 'GIF' && data.Delay && data.Scene) {
if (!tryAnimated && data && data.format && data.format.toUpperCase() === 'GIF' && data.Delay && data.Scene) {
grunt.verbose.warn(dstPath + ' is animated - skipping');

@@ -317,2 +317,6 @@ return true;

image.identify(function(err, data) {
if(err){
handleImageErrors(err, sizeOptions.engine);
}
if (!isAnimatedGif(data, dstPath, sizeOptions.tryAnimated)) {

@@ -399,3 +403,3 @@ image.size(function(error, size) {

extName = path.extname(dstPath);
baseName = path.basename(srcPath, extName); // filename without extension
baseName = path.basename(dstPath, extName); // filename without extension

@@ -463,43 +467,43 @@ if (customDest) {

// Iterate over all specified file groups.
task.files.forEach(function(f) {
// Iterate over all specified file groups.
task.files.forEach(function(f) {
var srcPath = '',
dstPath = '';
var srcPath = '',
dstPath = '';
checkForValidTarget(f);
checkForSingleSource(f);
checkForValidTarget(f);
checkForSingleSource(f);
// create a name for our image based on name, width, height
sizeOptions.name = getName({ name: sizeOptions.name, width: sizeOptions.width, height: sizeOptions.height }, options);
// create a name for our image based on name, width, height
sizeOptions.name = getName({ name: sizeOptions.name, width: sizeOptions.width, height: sizeOptions.height }, options);
// create an output name with prefix, suffix
sizeOptions.outputName = addPrefixSuffix(sizeOptions.name, sizeOptions.separator, sizeOptions.suffix, sizeOptions.rename);
// create an output name with prefix, suffix
sizeOptions.outputName = addPrefixSuffix(sizeOptions.name, sizeOptions.separator, sizeOptions.suffix, sizeOptions.rename);
srcPath = f.src[0];
dstPath = getDestination(srcPath, f.dest, sizeOptions, f.custom_dest, f.orig.cwd);
srcPath = f.src[0];
dstPath = getDestination(srcPath, f.dest, sizeOptions, f.custom_dest, f.orig.cwd);
// remove pixels from the value so the gfx process doesn't complain
sizeOptions = removeCharsFromObjectValue(sizeOptions, ['width', 'height'], 'px');
// remove pixels from the value so the gfx process doesn't complain
sizeOptions = removeCharsFromObjectValue(sizeOptions, ['width', 'height'], 'px');
series.push(function(callback) {
series.push(function(callback) {
if (sizeOptions.newFilesOnly) {
if (isFileNewVersion(srcPath, dstPath)) {
if (sizeOptions.newFilesOnly) {
if (isFileNewVersion(srcPath, dstPath)) {
return processImage(srcPath, dstPath, sizeOptions, tally, callback);
} else {
grunt.verbose.ok('File already exists: ' + dstPath);
return callback();
}
} else {
return processImage(srcPath, dstPath, sizeOptions, tally, callback);
} else {
grunt.verbose.ok('File already exists: ' + dstPath);
return callback();
}
} else {
return processImage(srcPath, dstPath, sizeOptions, tally, callback);
}
});
});
});
series.push(function(callback) {
outputResult(tally[sizeOptions.id], sizeOptions.name);
return callback();
});
series.push(function(callback) {
outputResult(tally[sizeOptions.id], sizeOptions.name);
return callback();
});
}

@@ -506,0 +510,0 @@ });

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc