From dfb71f536d08fcd45a3584be5bf2be82ab133a75 Mon Sep 17 00:00:00 2001 From: Luke Horvat Date: Tue, 4 Nov 2014 03:06:18 +1100 Subject: [PATCH] Add "noFile" option --- index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 31fcea5..f766f37 100644 --- a/index.js +++ b/index.js @@ -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 */