diff options
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gulpfile.js b/gulpfile.js index c0309ea9..7b891b3b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,9 +1,9 @@ // ========================================================================== // Gulp build script // ========================================================================== -/*global require, __dirname,Buffer*/ -/*jshint -W079 */ - +/* global require, __dirname,Buffer */ +/* jshint -W079 */ +/* beautify ignore:start */ var fs = require("fs"), path = require("path"), gulp = require("gulp"), @@ -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); } @@ -335,3 +335,5 @@ gulp.task("open", function () { gulp.task("publish", function () { run(tasks.js, tasks.less, tasks.sprite, "cdn", "demo"); }); + +/* beautify ignore:end */ |