🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

react-intl-cra

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-intl-cra

Extract messages of `Creact React App` from the command line

Source
npmnpm
Version
0.1.9
Version published
Weekly downloads
1K
47.36%
Maintainers
1
Weekly downloads
 
Created
Source

react-intl-cra

Extract messages of Creact React App from the command line.

This is just a workaround for create-react-app #1227 and react-intl #869 in unofficial way.

Installation

$ npm i react-intl-cra --save-dev

Usage

$ react-intl-cra './src/**/*.js' './messages.json'

Output

// messages.json

[
  {
    "id": "Account.account",
    "description": "Title",
    "defaultMessage": "帳戶",
    "filepath": "./src/containers/Account/messages.js"
  },
  {
    "id": "Account.myTestDevices",
    "defaultMessage": "我的測試裝置",
    "filepath": "./src/containers/Account/messages.js"
  },
  ...
]

API

ArgumentsDescription
First - srcPatternThe pattern of React component files
Second - desPathThe output pathname of the .json file.

FAQs

Package last updated on 19 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts