Formatting
This commit is contained in:
22
gulpfile.js
22
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 */
|
||||
|
Reference in New Issue
Block a user