Skip to content

Commit

Permalink
Merge pull request #9 from lukehorvat/master
Browse files Browse the repository at this point in the history
feat(stream): add stream option
  • Loading branch information
guzart committed Feb 3, 2015
2 parents fbc1e75 + dfb71f5 commit 481c8b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ function ngConstantPlugin(opts) {

var options = _.merge({}, defaults, opts);
var template = options.template || readFile(options.templatePath);
var stream = through.obj(objectStream);

return through.obj(objectStream);
if (options.noFile) {
stream.end(new gutil.File({ path: 'constants.json' }));
}

return stream;

function objectStream(file, enc, cb) {
/* jshint validthis: true */
Expand Down

0 comments on commit 481c8b7

Please # to comment.