Merge pull request #3454 from hosseinsh/gulp-buffer
Addressing Gulp Deprecation warning
This commit is contained in:
commit
cf7de0aa59
|
@ -40,7 +40,7 @@ function replaceAll(string, find, replace) {
|
||||||
function stringSrc(filename, string) {
|
function stringSrc(filename, string) {
|
||||||
let src = require('stream').Readable({objectMode: true});
|
let src = require('stream').Readable({objectMode: true});
|
||||||
src._read = function () {
|
src._read = function () {
|
||||||
this.push(new gutil.File({cwd: '', base: '', path: filename, contents: new Buffer(string)}));
|
this.push(new gutil.File({cwd: '', base: '', path: filename, contents: Buffer.from(string)}));
|
||||||
this.push(null);
|
this.push(null);
|
||||||
};
|
};
|
||||||
return src;
|
return src;
|
||||||
|
|
Loading…
Reference in New Issue