forked from gulpjs/gulp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Contra
committed
Dec 7, 2013
1 parent
dcaa92b
commit 633c88a
Showing
17 changed files
with
129 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var es = require('event-stream'); | ||
var fs = require('fs'); | ||
|
||
var readDir = require('./readDir'); | ||
var bufferFile = require('./bufferFile'); | ||
var streamFile = require('./streamFile'); | ||
|
||
module.exports = function(opt) { | ||
return es.map(function (file, cb) { | ||
// don't read anything - just pass names | ||
if (!opt.read) { | ||
return cb(null, file); | ||
} | ||
|
||
// don't fail to read a directory | ||
if (file.stat.isDirectory()) { | ||
return readDir(file, cb); | ||
} | ||
|
||
// read and pass full contents | ||
if (opt.buffer) { | ||
return bufferFile(file, cb); | ||
} | ||
|
||
// dont buffer anything - just pass streams | ||
return streamFile(file, cb); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var es = require('event-stream'); | ||
var fs = require('fs'); | ||
|
||
module.exports = function(opt) { | ||
return es.map(function (file, cb) { | ||
fs.stat(file.path, function (err, stat) { | ||
if (err) return cb(err); | ||
file.stat = stat; | ||
cb(null, file); | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = function(o) { | ||
// really shitty for now | ||
// really shitty | ||
return !!o && !!o.pipe; | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "gulp", | ||
"description": "The streaming build system", | ||
"version": "2.7.0", | ||
"version": "3.0.0", | ||
"homepage": "http://github.com/wearefractal/gulp", | ||
"repository": "git://github.com/wearefractal/gulp.git", | ||
"author": "Fractal <[email protected]> (http://wearefractal.com/)", | ||
|
@@ -17,7 +17,7 @@ | |
}, | ||
"dependencies": { | ||
"event-stream": "~3.0.16", | ||
"glob-stream": "~0.1.0", | ||
"glob-stream": "~3.0.0", | ||
"mkdirp": "~0.3.5", | ||
"optimist": "~0.6.0", | ||
"gulp-util": "~1.1.1", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters