broccoli-persistent-filter
Advanced tools
Comparing version 1.1.1 to 1.1.2
23
index.js
@@ -79,5 +79,2 @@ 'use strict'; | ||
this._debug('[operation:%s] %s', operation, relativePath); | ||
if (operation === 'change') { | ||
operation = 'create'; | ||
} | ||
@@ -88,9 +85,7 @@ switch (operation) { | ||
case 'unlink': return fs.unlinkSync(outputPath); | ||
case 'change': | ||
fs.unlinkSync(outputPath); | ||
return this._handleFile(relativePath, srcDir, destDir, entry, outputPath); | ||
case 'create': | ||
if (this.canProcessFile(relativePath)) { | ||
return this.processAndCacheFile(srcDir, destDir, entry); | ||
} else { | ||
var srcPath = srcDir + '/' + relativePath; | ||
return symlinkOrCopySync(srcPath, outputPath); | ||
} | ||
return this._handleFile(relativePath, srcDir, destDir, entry, outputPath); | ||
} | ||
@@ -100,2 +95,11 @@ }, this); | ||
Filter.prototype._handleFile = function(relativePath, srcDir, destDir, entry, outputPath) { | ||
if (this.canProcessFile(relativePath)) { | ||
return this.processAndCacheFile(srcDir, destDir, entry); | ||
} else { | ||
var srcPath = srcDir + '/' + relativePath; | ||
return symlinkOrCopySync(srcPath, outputPath); | ||
} | ||
}; | ||
/* | ||
@@ -162,3 +166,2 @@ The cache key to be used for this plugins set of dependencies. By default | ||
var relativePath = entry.relativePath; | ||
var outputRelativeFile = filter.getDestFilePath(relativePath); | ||
@@ -165,0 +168,0 @@ return Promise.resolve(). |
{ | ||
"name": "broccoli-persistent-filter", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "broccoli filter but with a persistent cache", | ||
@@ -42,2 +42,3 @@ "author": "Stefan Penner <stefan.penner@gmail.com>", | ||
"promise-map-series": "^0.2.1", | ||
"rimraf": "^2.4.3", | ||
"rsvp": "^3.0.18", | ||
@@ -44,0 +45,0 @@ "symlink-or-copy": "^1.0.1", |
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
17698
250
15
+ Addedrimraf@^2.4.3