i18next.scanner.js 596B

1234567891011121314151617
  1. const scanner = require('i18next-scanner')
  2. const vfs = require('vinyl-fs')
  3. const option = require('../i18next.option.js')
  4. // this script is run by npm run build-translation and generate i18next.scanner/**/*.json
  5. // --------------------
  6. // 2018/07/27 - currently, last version is 2.6.5 but a bug is spaming log with errors. So I'm using 2.6.1
  7. // this issue seems related : https://github.com/i18next/i18next-scanner/issues/88
  8. // --------------------
  9. vfs.src(['./src/**/*.jsx'])
  10. // .pipe(sort()) // Sort files in stream by path
  11. .pipe(scanner(option))
  12. .pipe(vfs.dest('./i18next.scanner'))