diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a56b50..9a70aea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.4.0 - 2018-05-25 + +* Directly use Reason parser api instead of forking the refmt exe for each file. + Message extraction is now lightning fast! 😀 +* Command line args + * allow multiple source directories to be specified + * support -v and -help options +* Support message extraction when `open ReactIntl;` was used. +* Added tests + Travis CI. + ## 0.3.0 - 2018-05-16 * Support `[@intl.messages]` for marking messages for extraction. @@ -11,4 +21,4 @@ ## 0.1.0 - 2018-05-13 -Initial Release. +* Initial Release. diff --git a/README.md b/README.md index 03e7506..7feb454 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,21 @@ [![Build Status](https://travis-ci.org/cknitt/bs-react-intl-extractor.svg?branch=master)](https://travis-ci.org/cknitt/bs-react-intl-extractor) Extracts messages for localization from [Reason] source files. +This assumes that you are using the [bs-react-intl] bindings for [react-intl]. -This assumes that you are using the [bs-react-intl] bindings for [react-intl] -and your source files define formatted messages in one of the following three ways: +## Installation + +macOS and Linux binaries are available for download on the [releases page]. + +## Usage + +```sh +bs-react-intl-extractor [path...] +``` + +where `path` is a Reason source file or a directory containing Reason source files. Multiple files/directories may be specified. + +Formatted messages may be defined in your source files in one of the following three ways: 1. inline in `FormattedMessage`: @@ -91,26 +103,6 @@ The output (a JSON array of all extracted messages sorted by id) is written to s ] ``` -## Download - -macOS and Linux binaries are available for download on the [releases page]. - -After you have downloaded a binary, make it executable using `chmod +x`. - -## Usage - -```sh -bs-react-intl-extractor directory ... -``` - -where `directory` is a directory containing Reason source files. Multiple directories may be specified. - -The reason formatter (`refmt`) needs to be on the path. - -## Known Issues - -Performance is not optimal right now as the `refmt` executable is forked for the processing of each file. - ## How to build Install [esy] as follows: