diff options
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gulpfile.js b/gulpfile.js index 923483e5..26b97238 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -77,20 +77,20 @@ function loadJSON(path) { // Create a file from a string // http://stackoverflow.com/questions/23230569/how-do-you-create-a-file-from-a-string-in-gulp function createFile(filename, string) { - var src = require('stream').Readable({ - objectMode: true + var src = require('stream').Readable({ + objectMode: true }); src._read = function () { - this.push(new gutil.File({ - cwd: "", - base: "", - path: filename, + this.push(new gutil.File({ + cwd: "", + base: "", + path: filename, contents: new Buffer(string), // stats also required for some functions // https://nodejs.org/api/fs.html#fs_class_fs_stats stat: { size: string.length - } + } })); this.push(null); } |