Closed philipwalton closed 8 years ago
Hi @philipwalton can you provide me with sample code that throws an exception? I'll try to find out asap
Like I said, I used the exact code form the README:
mkdir sharp-test && cd sharp-test
npm install gulp gulp-sharp
touch gulpfile.js
Inside gulpfile.js
the only thing I changed from the README was the source file:
var gulp = require('gulp');
var gulpSharp = require('gulp-sharp');
gulp.task('image-resize', function(){
return gulp.src( './test.png' )
.pipe(gulpSharp({
resize : [1280, 800],
max : true,
quality : 60,
progressive : true
}))
.pipe(gulp.dest('output'));
});
Then I ran
gulp image-resize
And got the error. Did you try it with a fresh install?
Don't you need a comma in the end of line 53 (https://github.com/rizalp/gulp-sharp/blob/master/index.js#L53)?
Yeah, because as it is now, the code gets interpreted like this:
undefined(opts.sharpen)
+1
+1
Please update here: https://www.npmjs.com/package/gulp-sharp.
I just installed this plugin and tried to run it with the exact configuration options specified in the README, and I get an error:
Here's the stack trace:
If I replace
undefined
at index.js:53:128 withfunction() {}
, everything seems to work fine.I'm using the latest version of gulp, node, and gulp-sharp on Mac OS X