gulp-append
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -33,3 +33,2 @@ 'use strict'; | ||
var transform = opts ? opts.transform : false; | ||
var named = opts ? opts.named : false; | ||
if (typeof opts === 'function') { | ||
@@ -43,13 +42,3 @@ cb = opts; | ||
} else if (data instanceof Array) { | ||
if (data.length > 0) { | ||
for (let obj of data) { | ||
if (obj[transform.name(file)]) { | ||
obj[transform.name(file)] = update(file, {transform: transform, named: named}, obj[transform.name(file)]); | ||
} else { | ||
data.push(add(file, {transform: transform, named: named})); | ||
} | ||
} | ||
} else { | ||
data.push(add(file, {transform: transform, named: named})); | ||
} | ||
data.push(add(file, opts)); | ||
} | ||
@@ -86,4 +75,4 @@ return cb(data); | ||
} | ||
cb(null, data); | ||
return cb(null, data); | ||
}); | ||
}; |
{ | ||
"name": "gulp-append", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "Append a file the easy way", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -115,3 +115,3 @@ # gulp-append [![Build Status](https://travis-ci.org/VandeurenGlenn/gulp-append.svg?branch=master)](https://travis-ci.org/VandeurenGlenn/gulp-append) | ||
*** creates an named object when true (checkout the [transform]() option to learn how to set an custom name)*** | ||
*** creates an named object when true (checkout the [transform](https://github.com/VandeurenGlenn/gulp-append#appendopts---transform) option to learn how to set an custom name)*** | ||
@@ -118,0 +118,0 @@ ```js |
8822
159