Skip to content

Commit 16b8910

Browse files
committed
@fluent/react 0.9.0
1 parent af2d38e commit 16b8910

File tree

9 files changed

+39
-32
lines changed

9 files changed

+39
-32
lines changed

fluent-react/.esdoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"source": "./src",
3-
"destination": "../html/fluent-react",
3+
"destination": "../html/react",
44
"plugins": [
55
{
66
"name": "esdoc-standard-plugin"

fluent-react/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fluent-react.js
2-
compat.js
1+
/index.js
2+
/compat.js

fluent-react/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ docs
44
examples
55
test
66
makefile
7+
compat_config.js

fluent-react/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## @fluent/react 0.9.0 (July 25, 2019)
4+
5+
- Rename `fluent-react` to `@fluent/react`.
6+
- Rename the runtime dependency to `@fluent/sequence`.
7+
- Rename the peer dependency to `@fluent/bundle`.
8+
39
## fluent-react 0.9.0 (July 25, 2019)
410

511
- Deprecate `fluent-react` in favor of `@fluent/react`.

fluent-react/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
# fluent-react
1+
# @fluent/react
22

3-
`fluent-react` provides React bindings for Project Fluent, a localization
3+
`@fluent/react` provides React bindings for Project Fluent, a localization
44
framework designed to unleash the expressive power of the natural language.
55

66

77
## Installation
88

9-
`fluent-react` can be used both on the client-side and the server-side. You
9+
`@fluent/react` can be used both on the client-side and the server-side. You
1010
can install it from the npm registry or use it as a standalone script (as the
1111
`FluentReact` global).
1212

13-
npm install fluent-react
13+
npm install @fluent/react
1414

1515

1616
# Integrating with React apps
1717

18-
`fluent-react` takes advantage of React's Components system and the virtual
19-
DOM. Translations are exposed to components via the _provider_ pattern.
18+
`@fluent/react` takes advantage of React's Components system and the virtual
19+
DOM. Translations are exposed to components via the _provider_ pattern.
2020

21-
There are many approaches to fetching and storing translations. To allow
22-
maximum flexibility, `fluent-react` expects the developer to write a little bit
23-
of a setup code related to language negotiation and translation fetching. It
24-
makes `fluent-react` unopinionated and suitable for many different scenarios.
25-
You will likely also need to install a few other packages: `fluent`,
26-
`fluent-langneg` and `intl-pluralrules`.
21+
There are many approaches to fetching and storing translations. To allow
22+
maximum flexibility, `@fluent/react` expects the developer to write a little
23+
bit of a setup code related to language negotiation and translation fetching.
24+
It makes `@fluent/react` unopinionated and suitable for many different
25+
scenarios. You will likely also need to install a few other packages:
26+
`@fluent/bundle`, `@fluent/langneg` and `intl-pluralrules`.
2727

28-
Consult the [wiki][] for documentation on how to set up and use `fluent-react`.
28+
Consult the [wiki][] for documentation on how to set up and use `@fluent/react`.
2929

3030
[wiki]: https://github.com/projectfluent/fluent.js/wiki/React-Bindings
3131

@@ -36,14 +36,14 @@ For legacy browsers, the `compat` build has been transpiled using Babel's [env
3636
preset][]:
3737

3838
```javascript
39-
import 'fluent-react/compat';
39+
import "@fluent/react/compat";
4040
```
4141

4242
In some cases, using the `compat` build may be needed even if you target
4343
modern browsers. For instance, the [`create-react-app` boilerplate uses
4444
UglifyJS to minify its files][create-react-app-minify]. As of November 2017,
4545
UglifyJS doesn't support some of the new JavaScript syntax features. By using
46-
the `compat` build of all `fluent` packages you can ensure that the
46+
the `compat` build of all `@fluent` packages you can ensure that the
4747
minifiction works properly.
4848

4949

fluent-react/compat_config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export default {
1313
["babel-plugin-transform-rename-import", {
1414
replacements: [
1515
{
16-
original: "fluent-sequence",
17-
replacement: "fluent-sequence/compat",
16+
original: "@fluent/sequence",
17+
replacement: "@fluent/sequence/compat",
1818
},
1919
{
2020
original: "cached-iterable",

fluent-react/makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
PACKAGE := fluent-react
1+
PACKAGE := @fluent/react
22
GLOBAL := FluentReact
3-
DEPS := fluent-sequence:FluentSequence,cached-iterable:CachedIterable,react:React,prop-types:PropTypes
3+
DEPS := @fluent/sequence:FluentSequence,cached-iterable:CachedIterable,react:React,prop-types:PropTypes
44

55
include ../common.mk
66

7-
build: $(PACKAGE).js compat.js
7+
build: index.js compat.js
88

9-
$(PACKAGE).js: $(SOURCES)
9+
index.js: $(SOURCES)
1010
@rollup $(CURDIR)/src/index.js \
1111
--config $(ROOT)/bundle_config.js \
1212
--banner "/* $(PACKAGE)@$(VERSION) */" \
@@ -22,11 +22,11 @@ compat.js: $(SOURCES)
2222
--banner "/* $(PACKAGE)@$(VERSION) */" \
2323
--amd.id $(PACKAGE) \
2424
--name $(GLOBAL) \
25-
--globals fluent-sequence/compat:FluentSequence,cached-iterable/compat:CachedIterable,$(DEPS) \
25+
--globals @fluent/sequence/compat:FluentSequence,cached-iterable/compat:CachedIterable,$(DEPS) \
2626
--output.file $@
2727
@echo -e " $(OK) $@ built"
2828

2929
clean:
30-
@rm -f $(PACKAGE).js compat.js
30+
@rm -f index.js compat.js
3131
@rm -rf .nyc_output coverage
3232
@echo -e " $(OK) clean"

fluent-react/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "fluent-react",
2+
"name": "@fluent/react",
33
"description": "Fluent bindings for React",
44
"version": "0.9.0",
5-
"homepage": "http://projectfluent.org",
5+
"homepage": "https://projectfluent.org",
66
"author": "Mozilla <[email protected]>",
77
"license": "Apache-2.0",
88
"contributors": [
@@ -18,7 +18,7 @@
1818
"directories": {
1919
"lib": "./src"
2020
},
21-
"main": "./fluent-react.js",
21+
"main": "./index.js",
2222
"module": "./src/index.js",
2323
"repository": {
2424
"type": "git",
@@ -47,11 +47,11 @@
4747
},
4848
"dependencies": {
4949
"cached-iterable": "^0.2.1",
50-
"fluent-sequence": "^0.2.0",
50+
"@fluent/sequence": "0.4.0",
5151
"prop-types": "^15.6.0"
5252
},
5353
"peerDependencies": {
54-
"fluent": ">=0.8.0 <0.14.0",
54+
"@fluent/bundle": ">=0.13.0 <0.14.0",
5555
"react": "^0.14.9 || ^15.0.0 || ^16.0.0"
5656
},
5757
"devDependencies": {

fluent-react/src/localization.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { mapBundleSync } from "fluent-sequence";
1+
import { mapBundleSync } from "@fluent/sequence";
22
import { CachedSyncIterable } from "cached-iterable";
33

44
/*

0 commit comments

Comments
 (0)