Skip to content

Commit d79fe1b

Browse files
committed
@fluent/bundle 0.13.0
1 parent 2f675de commit d79fe1b

File tree

10 files changed

+34
-29
lines changed

10 files changed

+34
-29
lines changed

fluent/.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",
3+
"destination": "../html/bundle",
44
"plugins": [
55
{
66
"name": "esdoc-standard-plugin"

fluent/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fluent.js
1+
index.js
22
compat.js

fluent/CHANGELOG.md

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

3+
## @fluent/bundle 0.13.0 (July 25, 2019)
4+
5+
- Rename `fluent` to `@fluent/bundle`.
6+
37
## fluent 0.13.0 (July 25, 2019)
48

59
- Support Fluent Syntax 1.0.

fluent/README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
# fluent
1+
# @fluent/bundle
22

3-
`fluent` is a JavaScript implementation of Project Fluent, a localization
4-
framework designed to unleash the expressive power of the natural language.
3+
`@fluent/bundle` is a JavaScript implementation of Project Fluent, a
4+
localization framework designed to unleash the expressive power of the
5+
natural language.
56

67

78
## Installation
89

9-
`fluent` can be used both on the client-side and the server-side. You can
10-
install it from the npm registry or use it as a standalone script (as the
11-
`Fluent` global).
10+
`@fluent/bundle` can be used both on the client-side and the server-side. You
11+
can install it from the npm registry or use it as a standalone script (as the
12+
`FluentBundle` global).
1213

13-
npm install fluent
14+
npm install @fluent/bundle
1415

1516

1617
## How to use
@@ -19,7 +20,7 @@ The `FluentBundle` constructor provides the core functionality of formatting
1920
translations from FTL files.
2021

2122
```javascript
22-
import { FluentBundle, ftl } from 'fluent';
23+
import { FluentBundle, ftl } from '@fluent/bundle';
2324

2425
const bundle = new FluentBundle('en-US');
2526

@@ -54,14 +55,14 @@ however, a polyfill will be required. We recommend [intl-pluralrules][].
5455

5556
```javascript
5657
import 'intl-pluralrules';
57-
import { FluentBundle } from 'fluent';
58+
import { FluentBundle } from '@fluent/bundle';
5859
```
5960

6061
For legacy browsers, the `compat` build has been transpiled using Babel's [env
6162
preset][]. It requires the regenerator runtime provided by [babel-polyfill][].
6263

6364
```javascript
64-
import { FluentBundle } from 'fluent/compat';
65+
import { FluentBundle } from '@fluent/bundle/compat';
6566
```
6667

6768

fluent/makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
PACKAGE := fluent
2-
GLOBAL := Fluent
1+
PACKAGE := @fluent/bundle
2+
GLOBAL := FluentBundle
33

44
include ../common.mk
55

6-
build: $(PACKAGE).js compat.js
6+
build: index.js compat.js
77

8-
$(PACKAGE).js: $(SOURCES)
8+
index.js: $(SOURCES)
99
@rollup $(CURDIR)/src/index.js \
1010
--config $(ROOT)/bundle_config.js \
1111
--banner "/* $(PACKAGE)@$(VERSION) */" \
@@ -24,7 +24,7 @@ compat.js: $(SOURCES)
2424
@echo -e " $(OK) $@ built"
2525

2626
clean:
27-
@rm -f $(PACKAGE).js compat.js
27+
@rm -f index.js compat.js
2828
@rm -rf .nyc_output coverage
2929
@echo -e " $(OK) clean"
3030

fluent/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "fluent",
2+
"name": "@fluent/bundle",
33
"description": "Localization library for expressive translations.",
44
"version": "0.13.0",
55
"homepage": "http://projectfluent.org",
@@ -18,7 +18,7 @@
1818
"directories": {
1919
"lib": "./src"
2020
},
21-
"main": "./fluent.js",
21+
"main": "./index.js",
2222
"module": "./src/index.js",
2323
"repository": {
2424
"type": "git",

tools/perf/benchmark.common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function runTest(env) {
2121
{
2222
const testName = "parse-runtime";
2323
let start = env.now();
24-
resource = env.Fluent.FluentResource.fromString(ftlCode);
24+
resource = env.FluentBundle.FluentResource.fromString(ftlCode);
2525
let end = env.now();
2626

2727
// we don't report any runtime parser errors, so
@@ -38,7 +38,7 @@ function runTest(env) {
3838
let body = functions[fnName];
3939
fncs[fnName] = new Function(body);
4040
}
41-
const bundle = new env.Fluent.FluentBundle('en-US', {
41+
const bundle = new env.FluentBundle.FluentBundle('en-US', {
4242
functions: fncs
4343
});
4444
const errors = bundle.addResource(resource);

tools/perf/benchmark.d8.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
load('../../fluent/fluent.js');
2-
load('../../fluent-syntax/fluent-syntax.js');
1+
load('../../fluent/index.js');
2+
load('../../fluent-syntax/index.js');
33
load('./benchmark.common.js');
44

55
const env = {
@@ -12,7 +12,7 @@ const env = {
1212
benchmarkName: arguments[0],
1313
now: Date.now,
1414
FluentSyntax,
15-
Fluent,
15+
FluentBundle,
1616
};
1717

1818
const results = runTest(env);

tools/perf/benchmark.jsshell.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
load('../../fluent/fluent.js');
2-
load('../../fluent-syntax/fluent-syntax.js');
1+
load('../../fluent/index.js');
2+
load('../../fluent-syntax/index.js');
33
load('./benchmark.common.js');
44

55
const env = {
@@ -12,7 +12,7 @@ const env = {
1212
benchmarkName: scriptArgs[0],
1313
now: performance.now,
1414
FluentSyntax,
15-
Fluent,
15+
FluentBundle,
1616
};
1717

1818
const results = runTest(env);

tools/perf/benchmark.node.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const fs = require('fs');
22

3-
const Fluent = require('../../fluent');
3+
const FluentBundle = require('../../fluent');
44
const FluentSyntax = require('../../fluent-syntax');
55
const { runTest } = require('./benchmark.common');
66
require('intl-pluralrules');
@@ -15,7 +15,7 @@ const env = {
1515
benchmarkName: process.argv[2],
1616
now: process.hrtime,
1717
FluentSyntax,
18-
Fluent,
18+
FluentBundle,
1919
};
2020

2121
const results = runTest(env);

0 commit comments

Comments
 (0)