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
commit cf7de0aa59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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;