Merge pull request #3454 from hosseinsh/gulp-buffer

Addressing Gulp Deprecation warning
This commit is contained in:
Hossein Shafagh
2021-03-03 16:43:13 -08:00
committed by GitHub

View File

@ -40,7 +40,7 @@ function replaceAll(string, find, replace) {
function stringSrc(filename, string) {
let src = require('stream').Readable({objectMode: true});
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);
};
return src;