Skip to content

Commit

Permalink
Add "noFile" option
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehorvat committed Nov 3, 2014
1 parent 704aae3 commit dfb71f5
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 dfb71f5

Please # to comment.