MM-51975 : Standardise Formatjs config for Playbooks & Boards (#22948)

Added Formatjs's built-in formatter called "simple". With this change, the intermediate Formatjs compile step is removed. Additionally, the npm command for Playbooks was standardised by replacing "extract" with "i18n-extract" to ensure consistency across all products.
Этот коммит содержится в:
M-ZubairAhmed
2023-04-16 13:23:36 +05:30
коммит произвёл GitHub
родитель 2119bc0901
Коммит 5c8880321f
4 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@@ -124,7 +124,7 @@
"test:debug": "cross-env TZ=Etc/UTC jest --forceExit --detectOpenHandles --verbose",
"test-ci": "cross-env TZ=Etc/UTC jest --ci --maxWorkers=100%",
"check-types": "tsc -b",
"extract": "formatjs extract 'src/**/*.{ts,tsx}' --ignore \"**/*.d.ts\" --out-file i18n/temp.json --id-interpolation-pattern '[sha512:contenthash:base64:6]' && formatjs compile 'i18n/temp.json' --out-file i18n/en.json && rm i18n/temp.json",
"i18n-extract": "formatjs extract \"src/**/*.{ts,tsx}\" --ignore \"**/*.d.ts\" --id-interpolation-pattern '[sha512:contenthash:base64:6]' --format simple --out-file i18n/en.json",
"graphql": "graphql-codegen --config graphql_gen.ts",
"report-unused-exports": "ts-prune",
"build:product": "webpack --mode=production",