I have upgraded to gulp 4.0.2
version I need to update one of the tasks
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/'));
});
I want these files to be converted to Vinyl objects:
[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
otherwise I have and error
Error: Received a non-Vinyl object in `dest()`
Is there a function that I can pipe to in order to make this task work properly?
i18next-parser
version is 0.7.0
. Upgrading to latest 3.6.0
version doesn't produce any output at all.
So I solved this by adding extra step using gulp-map