src/concat.js
function concat(divider, sourcePath, relativePaths, done) {
  var writeDivider = false;
  each(relativePaths, function(relativePath, next) {
    var absoluteSourcePath = path.resolve(sourcePath, relativePath);
    var readStream = fs.createReadStream(absoluteSourcePath);
    if (writeDivider) process.stdout.write(divider);
    writeDivider = true;
    readStream.on('close', next).on('error', next).pipe(process.stdout);
  }, done);
}
function concat(divider, sourcePath, relativePaths, done) {
  var writeDivider = false;
  each(relativePaths, function(relativePath, next) {
    var absoluteSourcePath = path.resolve(sourcePath, relativePath);
    var readStream = fs.createReadStream(absoluteSourcePath);
    if (writeDivider) process.stdout.write(divider);
    writeDivider = true;
    readStream.on('close', next).on('error', next).pipe(process.stdout);
  }, done);
}
function concat ( divider , sourcePath , relativePaths , done ) { var writeDivider = false ; each ( relativePaths , function ( relativePath , next ) { var absoluteSourcePath = path . resolve ( sourcePath , relativePath ) ; var readStream = fs . createReadStream ( absoluteSourcePath ) ; if ( writeDivider ) process . stdout . write ( divider ) ; writeDivider = true ; readStream . on ( 'close' , next ) . on ( 'error' , next ) . pipe ( process . stdout ) ; } , done ) ; }
Concatenate files from the source path into the standard output.
@param {string} divider
@param {string} sourcePath
@param {Array.<string>} relativePaths
@param {function(Error)=} done
Concatenate files from the source path into the standard output .