Gulp 吞咽更换不工作的最新版本

Gulp 吞咽更换不工作的最新版本,gulp,gulp-replace,Gulp,Gulp Replace,//创建一个scss主题文件 吞咽任务'theme-scss',函数{ 在'error',gutil.log上返回gulp.src['./retailer-theme.json'] .pipereplace'/.*/m',hello'。在'error',gutil.log上 //.pipejsonass{prefix:'$theme:'}.on'error',gutil.log /*.管道重命名{ 目录名:'./', basename:“零售商”, 后缀:'-theme', extname:“.

//创建一个scss主题文件 吞咽任务'theme-scss',函数{ 在'error',gutil.log上返回gulp.src['./retailer-theme.json'] .pipereplace'/.*/m',hello'。在'error',gutil.log上 //.pipejsonass{prefix:'$theme:'}.on'error',gutil.log /*.管道重命名{ 目录名:'./', basename:“零售商”, 后缀:'-theme', extname:“.scss” }.on'error',gutil.log*/ .pipegulp.destAPP_DIR+'/scss/variables/'.on'error',gutil.log }
因此,我必须创建一个regexp对象,如果他们在文档中有这个对象,那就太好了。实际上,如果您只是从原始regexp中删除引号的话

.pipe(replace('/.*/m', 'hello')).on('error', gutil.log)


我敢打赌它一定有用。与引号不匹配。

你说得对,它不使用引号,唯一的问题是我必须用g标志替换m标志,使用regex对象也可以,谢谢
.pipe(replace('/.*/m', 'hello')).on('error', gutil.log)
.pipe(replace(/.*/m, 'hello')).on('error', gutil.log)