Comparing version 0.3.0 to 0.3.1
'use strict'; | ||
var path = require('path'); | ||
var defaults = require('lodash.defaults'); | ||
var map = require('map-stream'); | ||
var path = require('path'); | ||
var through2 = require('through2'); | ||
var mkdirp = require('mkdirp'); | ||
@@ -30,3 +30,3 @@ var fs = require('graceful-fs'); | ||
function saveFile (file, cb) { | ||
function saveFile (file, enc, cb) { | ||
var basePath; | ||
@@ -52,12 +52,12 @@ if (typeof outFolder === 'string') { | ||
if (err) { | ||
return cb(err); | ||
cb(err); | ||
} else { | ||
writeContents(writePath, file, cb); | ||
} | ||
writeContents(writePath, file, cb); | ||
}); | ||
} | ||
var stream = map(saveFile); | ||
return stream; | ||
return through2.obj(saveFile); | ||
} | ||
module.exports = dest; |
'use strict'; | ||
var map = require('map-stream'); | ||
var through2 = require('through2'); | ||
@@ -10,3 +10,3 @@ var readDir = require('./readDir'); | ||
function getContents(opt) { | ||
return map(function (file, cb) { | ||
return through2.obj(function (file, enc, cb) { | ||
// don't fail to read a directory | ||
@@ -13,0 +13,0 @@ if (file.isDirectory()) { |
'use strict'; | ||
var map = require('map-stream'); | ||
var through2 = require('through2'); | ||
var fs = require('graceful-fs'); | ||
function getStats() { | ||
return map(fetchStats); | ||
return through2.obj(fetchStats); | ||
} | ||
function fetchStats(file, cb) { | ||
function fetchStats(file, enc, cb) { | ||
fs.stat(file.path, function (err, stat) { | ||
if (err) { | ||
return cb(err); | ||
if (stat) { | ||
file.stat = stat; | ||
} | ||
file.stat = stat; | ||
cb(null, file); | ||
cb(err, file); | ||
}); | ||
@@ -19,0 +17,0 @@ } |
{ | ||
"name": "vinyl-fs", | ||
"description": "Vinyl adapter for the file system", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"homepage": "http://github.com/wearefractal/vinyl-fs", | ||
@@ -14,3 +14,2 @@ "repository": "git://github.com/wearefractal/vinyl-fs.git", | ||
"lodash.defaults": "^2.4.1", | ||
"map-stream": "^0.1.0", | ||
"mkdirp": "^0.5.0", | ||
@@ -30,4 +29,3 @@ "strip-bom": "^0.3.0", | ||
"rimraf": "^2.2.5", | ||
"should": "^4.0.0", | ||
"through2": "^0.5.1" | ||
"should": "^4.0.0" | ||
}, | ||
@@ -34,0 +32,0 @@ "scripts": { |
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
9
8
33040
735
- Removedmap-stream@^0.1.0
- Removedmap-stream@0.1.0(transitive)