Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 3.0.0

- **[ BREAKING ]** Package renamed to `rescript-react-intl`.
- **[ BREAKING ]** ReScript support
- Now requires ReScript >= 9.1.0 and @rescript/react
- The names of "enum" values now exactly match the names in JavaScript, e.g. `#"2-digit"` instead of `#twoDigit`.

# 2.0.0
* **[ BREAKING ]** `bs-platform >=7.2.2`.
* **[ BREAKING ]** `react-intl >=4.0.0`:
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Alex Fedoseev, Christoph Knittel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
# bs-react-intl
# rescript-react-intl

[![NPM](https://nodei.co/npm/bs-react-intl.png?compact=true)](https://nodei.co/npm/bs-react-intl/)

[BuckleScript](https://bucklescript.github.io) bindings to [react-intl].
[ReScript] bindings to [react-intl].

To extract messages from [Reason](https://reasonml.github.io) source files for localization, use [bs-react-intl-extractor](https://github.com/cknitt/bs-react-intl-extractor).
To extract messages from [ReScript] source files for localization, use [rescript-react-intl-extractor].

## Installation

```shell
# yarn
yarn add bs-react-intl
yarn add rescript-react-intl

# or npm
npm install --save bs-react-intl
npm install --save rescript-react-intl
```

Note: If you need version of the bindings that still supports the old Reason syntax, use the old package name `bs-react-intl` instead.

## Examples

Clone this repo.

```shell
Expand All @@ -24,9 +28,13 @@ yarn start
```

## Status
bs-react-intl should cover all of the [react-intl] 3.0.0 API. If you find anything missing, please file an issue.

rescript-react-intl should cover all of the [react-intl] 3.0.0 API. If you find anything missing, please file an issue.

## Usage

See [`examples`](./examples) folder.

[react-intl]: https://github.com/formatjs/react-intl
[rescript]: https://rescript-lang.org
[react-intl]: https://github.com/formatjs/react-intl
[rescript-react-intl-extractor]: https://github.com/cca-io/rescript-react-intl-extractor
2 changes: 1 addition & 1 deletion bsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "bs-react-intl",
"name": "rescript-react-intl",
"sources": [
"src",
{
Expand Down
4 changes: 2 additions & 2 deletions examples/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>bs-react-intl</title>
<meta charset="utf-8" />
<title>rescript-react-intl</title>
<link rel="stylesheet" href="./index.css" />
</head>
<body>
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "bs-react-intl",
"version": "2.0.0",
"description": "BuckleScript bindings to react-intl",
"author": "Alex Fedoseev <alex.fedoseev@gmail.com>",
"name": "rescript-react-intl",
"version": "3.0.0",
"description": "ReScript bindings to react-intl",
"author": "Christoph Knittel <ck@cca.io>",
"contributors": [
"Alex Fedoseev <alex.fedoseev@gmail.com>"
],
"license": "MIT",
"main": "src/ReactIntl.bs.js",
"scripts": {
Expand Down Expand Up @@ -33,7 +36,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/reasonml-community/bs-react-intl"
"url": "https://github.com/cca-io/rescript-react-intl"
},
"files": [
"src",
Expand All @@ -42,9 +45,6 @@
"keywords": [
"react",
"react-intl",
"reason",
"reasonml",
"ocaml",
"bucklescript"
"rescript"
]
}