Skip to content

Commit

Permalink
fix(app): Fix gulp release:full
Browse files Browse the repository at this point in the history
  • Loading branch information
thaiat committed Jan 26, 2016
1 parent 89a00b2 commit 6112541
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion gulp_tasks/common/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ var chalk = require('chalk');
var stripJsonComments = require('strip-json-comments');
var _ = require('lodash');
var path = require('path');
var es = require('event-stream');
var gulp = require('gulp');

/**
* A generic handler for require('child_process').exec
Expand Down Expand Up @@ -65,13 +67,27 @@ var filterFiles = function(files, extension) {
});
};

/**
* Add new sources in a gulp pipeline
* @returns {Stream} A gulp stream
* @example
* gulp.src('')
* .pipe(addSrc('CHANGELOG.md'))
* .gulp.dest();
*/
var addSrc = function() {
var pass = es.through();
return es.duplex(pass, es.merge(gulp.src.apply(gulp.src, arguments), pass));
};

module.exports = {

execHandler: execHandler,
readTextFile: readTextFile,
readJsonFile: readJsonFile,
writeTextFile: writeTextFile,
writeJsonFile: writeJsonFile,
filterFiles: filterFiles
filterFiles: filterFiles,
addSrc: addSrc

};

0 comments on commit 6112541

Please sign in to comment.