Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Installation

$ npm install babel-plugin-react-intl

Usage

Via.babelrc (Recommended)

.babelrc

{"plugins": ["react-intl"],"extra": {"react-intl": {"messagesDir":"./build/messages/","enforceDescriptions":true    }  }}

Options

  • messagesDir: The target location where the plugin will output a.json file corresponding to each component from which React Intl messages were extracted.

  • enforceDescriptions: Whether or not message declarationsmust contain adescription to provide context to translators.

Via CLI

$ babel --plugins react-intl script.js

Via Node API

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

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript100.0%

[8]ページ先頭

©2009-2025 Movatter.jp