gulp-newer
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -82,5 +82,7 @@ var Transform = require('stream').Transform; | ||
// stat dest/relative file | ||
var relative = srcFile.relative; | ||
var ext = path.extname(relative); | ||
var destFileRelative = self._ext ? | ||
srcFile.relative.replace(/\..*?$/, self._ext) : | ||
srcFile.relative; | ||
relative.substr(0, relative.length - ext.length) + self._ext : | ||
relative; | ||
return Q.nfcall(fs.stat, path.join(self._dest, destFileRelative)); | ||
@@ -87,0 +89,0 @@ } else { |
{ | ||
"name": "gulp-newer", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Only pass through newer source files", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/tschaub/gulp-newer", |
@@ -22,8 +22,8 @@ # `gulp-newer` | ||
var imgSrc = 'src/img/**'; | ||
var imgDest = 'build/img'; | ||
// Minify any new images | ||
gulp.task('images', function() { | ||
var imgSrc = 'src/img/**'; | ||
var imgDest = 'build/img'; | ||
// Add the newer pipe to pass through newer images only | ||
@@ -38,5 +38,3 @@ return gulp.src(imgSrc) | ||
gulp.task('default', function() { | ||
gulp.watch(imgSrc, function() { | ||
gulp.run('images'); | ||
}); | ||
gulp.watch(imgSrc, ['images']); | ||
}); | ||
@@ -43,0 +41,0 @@ ``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21898
622
80