Skip to content

Instantly share code, notes, and snippets.

@florianmartens
Created May 20, 2021 12:28
Show Gist options
  • Save florianmartens/7810e55f5fbf394c92015fe11482024a to your computer and use it in GitHub Desktop.
Save florianmartens/7810e55f5fbf394c92015fe11482024a to your computer and use it in GitHub Desktop.
{
...
"scripts": {
"dev": "next dev",
"build": "npm run i18n && next build",
"start": "next start",
"extract:i18n": "formatjs extract '{pages,components,sections}/**/*.{js,ts,tsx}' --format simple --id-interpolation-pattern '[sha512:contenthash:base64:6]' --out-file content/locales/en.json",
"compile:i18n": "formatjs compile-folder --ast --format simple content/locales content/compiled-locales",
"i18n": "npm run extract:i18n && npm run compile:i18n"
},
"dependencies": {
...
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment