Skip to content

Commit

Permalink
make identifier more unique
Browse files Browse the repository at this point in the history
Fixes an issue where if two different file types had the same filename only the newest would be kept.

admin-12345678.css <-- older would be deleted
admin-12345678.js
  • Loading branch information
tuurbo committed Oct 2, 2014
1 parent a30e0ac commit 391bd4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function plugin(keepQuantity) {
return through.obj(function (file, enc, cb) {
var regex = new RegExp('^(.*)-[0-9a-f]{8}(?:\\.min)?\\' + path.extname(file.path) + '$');
if (regex.test(file.path)) {
var identifier = regex.exec(file.path)[1];
var identifier = regex.exec(file.path)[1] + path.extname(file.path);
if (lists[identifier] === undefined) {
lists[identifier] = [];
}
Expand Down

0 comments on commit 391bd4a

Please sign in to comment.