1

According to Format.js docs, I can extract all messages from the source codes using flowing commands.

yarn extract 'src/**/*.js*' --out-file lang/en.json --id-interpolation-pattern '[sha512:contenthash:base64:6]'

It's working fine but when I go to compile this lang files I can only compile a single file at a time using the following command. Docs link

yarn compile lang/fr.json --ast --out-file compiled-lang/fr.json

If I have multiple language files like:es.json,fr.json,ga.json,bn.json then I have to run this command four times but I wanna run this command only one time and it will compile all JSON file inside the lang folder.

Is there any way to do it?

Shifut Hossain
  • 1,599
  • 3
  • 14
  • 24

1 Answers1

2

You're looking for compile-folder command from the CLI https://formatjs.io/docs/tooling/cli#folder-compilation

Long Ho
  • 599
  • 4
  • 15