我已经升级到 gulp4.0.2
版本我需要更新其中一项任务
const debug = require('gulp-debug');
const i18nextParser = require('i18next-parser');
function myTask() {
return gulp
.src(['./js/**/*.js', './js/**/*.jsx'])
.pipe(
i18nextParser({
locales: ['en', 'de'],
functions: ['translate'],
output: '/opt/locales/'
})
)
.pipe(debug())
.pipe(gulp.dest('/opt/locales/'));
});
我希望将这些文件转换为 Vinyl 对象:
[17:04:32] gulp-debug: opt/locales/de/translation.json
[17:04:32] gulp-debug: opt/locales/de/translation_old.json
[17:04:32] gulp-debug: opt/locales/en/translation.json
[17:04:32] gulp-debug: opt/locales/en/translation_old.json
否则我有错误
Error: Received a non-Vinyl object in `dest()`
为了使这项任务正常工作,我可以通过管道传递一个函数吗?
i18next-parser
版本是0.7.0
. 升级到最新3.6.0
版本根本不会产生任何输出。