forked fromformatjs/babel-plugin-react-intl
- Notifications
You must be signed in to change notification settings - Fork0
Extracts string messages from React components that use React Intl.
License
NotificationsYou must be signed in to change notification settings
GertjanReynaert/babel-plugin-react-intl
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
THIS IS A PREVIEW RELEASE THAT WORKS WITH A FUTURE, UNRELEASED VERSION OF REACT INTL.
Extracts string messages from React components that useReact Intl.
$ npm install babel-plugin-react-intl
.babelrc
{"plugins": ["react-intl"],"extra": {"react-intl": {"messagesDir":"./build/messages/","enforceDescriptions":true } }}messagesDir: The target location where the plugin will output a.jsonfile corresponding to each component from which React Intl messages were extracted.enforceDescriptions: Whether or not message declarationsmust contain adescriptionto provide context to translators.
$ babel --plugins react-intl script.js
require("babel-core").transform("code",{plugins:["react-intl"]})// => { code, map, ast, metadata['react-intl'].messages };
About
Extracts string messages from React components that use React Intl.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Languages
- JavaScript100.0%