【文件属性】:
文件名称:extract-react-intl:提取react-intl消息
文件大小:111KB
文件格式:ZIP
更新时间:2021-01-31 03:03:05
react i18n babel component extract
此仓库已迁移到
提取React国际
此程序包使您可以从全局提取所有消息。 它将为您传递的每个语言环境返回一个带有键的对象,该键又包含一个对象,该对象具有由的函数定义的每个消息的ID。 除了将由填充的defaultLocale以外,每个键的值都是一个空字符串。
安装
$ yarn add --dev extract-react-intl
用法
const extractReactIntl = require ( 'extract-react-intl' )
const pattern = 'app/**/*.js'
const locales = [ 'en' , 'ja' ]
extractReactIntl ( locales , pattern ) . then ( result => {
console . log ( result )
/*
{
en:
{ 'components/App/hello': 'hello',
'components/App/welcome': 'welcome to extract-react-intl' }
ja
【文件预览】:
extract-react-intl-master
----.travis.yml(218B)
----.eslintrc(31B)
----.babelrc(157B)
----index.js(3KB)
----flow-typed()
--------npm()
----.flowconfig(100B)
----package.json(2KB)
----readme.md(5KB)
----.github()
--------PULL_REQUEST_TEMPLATE.md(1011B)
--------ISSUE_TEMPLATE.md(474B)
----test()
--------test.js(830B)
--------__snapshots__()
--------pluginOrdering()
--------resolution()
--------fixtures()
----.prettierrc(43B)
----.prettierignore(69B)
----license(1KB)
----.all-contributorsrc(2KB)
----.gitignore(22B)
----CODE_OF_CONDUCT.md(3KB)
----yarn.lock(238KB)
----.eslintignore(88B)
----.editorconfig(147B)
----.gitattributes(43B)