From 92db8e22a6cb98ac5ca785eb54e9c2563d12b5a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sta=C5=9B=20Ma=C5=82olepszy?= Date: Thu, 25 Jul 2019 19:18:37 +0200 Subject: [PATCH] @fluent/dom 0.5.0 --- fluent-dom/.esdoc.json | 2 +- fluent-dom/.gitignore | 4 ++-- fluent-dom/CHANGELOG.md | 4 ++++ fluent-dom/README.md | 14 +++++++------- fluent-dom/makefile | 8 ++++---- fluent-dom/package.json | 4 ++-- 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/fluent-dom/.esdoc.json b/fluent-dom/.esdoc.json index 6e4bae3cd..407f0bc1b 100644 --- a/fluent-dom/.esdoc.json +++ b/fluent-dom/.esdoc.json @@ -1,6 +1,6 @@ { "source": "./src", - "destination": "../html/fluent-dom", + "destination": "../html/dom", "plugins": [ { "name": "esdoc-standard-plugin" diff --git a/fluent-dom/.gitignore b/fluent-dom/.gitignore index 6c1d1fc8b..7d147bec1 100644 --- a/fluent-dom/.gitignore +++ b/fluent-dom/.gitignore @@ -1,2 +1,2 @@ -fluent-dom.js -compat.js +/index.js +/compat.js diff --git a/fluent-dom/CHANGELOG.md b/fluent-dom/CHANGELOG.md index efce8352e..19691ef3f 100644 --- a/fluent-dom/CHANGELOG.md +++ b/fluent-dom/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## @fluent/dom 0.5.0 (July 25, 2019) + + - Rename `fluent-dom` to `@fluent/dom`. + ## fluent-dom 0.5.0 (July 25, 2019) - Deprecate `fluent-dom` in favor of `@fluent/dom`. diff --git a/fluent-dom/README.md b/fluent-dom/README.md index fbfdc4086..70ed647ee 100644 --- a/fluent-dom/README.md +++ b/fluent-dom/README.md @@ -1,28 +1,28 @@ -# fluent-dom +# @fluent/dom -`fluent-dom` provides DOM bindings for Project Fluent, a localization +`@fluent/dom` provides DOM bindings for Project Fluent, a localization framework designed to unleash the expressive power of the natural language. ## Installation -`fluent-dom` can be used both on the client-side and the server-side. You +`@fluent/dom` can be used both on the client-side and the server-side. You can install it from the npm registry or use it as a standalone script (as the `FluentDOM` global). - npm install fluent-dom + npm install @fluent/dom ## How to use The `DOMLocalization` constructor provides the core functionality of full-fallback ready message formatting. It uses a lazy-resolved -`FluentBundle` objects from the `fluent` package to format messages. +`FluentBundle` objects from the `@fluent/bundle` package to format messages. On top of that, `DOMLocalization` can localize any DOMFragment by identifying localizable elements with `data-l10n-id` and translating them. ```javascript -import { DOMLocalization } from 'fluent-dom' +import { DOMLocalization } from '@fluent/dom' const l10n = new DOMLocalization(MutationObserver, [ '/browser/main.ftl', @@ -45,7 +45,7 @@ For imperative uses straight from the JS code, there's also a `Localization` class that provides just the API needed to format messages in the running code. ```javascript -import { Localization } from 'fluent-dom' +import { Localization } from '@fluent/dom' function *generateBundles() { // Some lazy logic for yielding FluentBundles. diff --git a/fluent-dom/makefile b/fluent-dom/makefile index bcdaa6d3a..e37ac1258 100644 --- a/fluent-dom/makefile +++ b/fluent-dom/makefile @@ -1,12 +1,12 @@ -PACKAGE := fluent-dom +PACKAGE := @fluent/dom GLOBAL := FluentDOM DEPS := cached-iterable:CachedIterable include ../common.mk -build: $(PACKAGE).js compat.js +build: index.js compat.js -$(PACKAGE).js: $(SOURCES) +index.js: $(SOURCES) @rollup $(CURDIR)/src/index.js \ --config $(ROOT)/bundle_config.js \ --banner "/* $(PACKAGE)@$(VERSION) */" \ @@ -27,6 +27,6 @@ compat.js: $(SOURCES) @echo -e " $(OK) $@ built" clean: - @rm -f $(PACKAGE).js compat.js + @rm -f index.js compat.js @rm -rf .nyc_output coverage @echo -e " $(OK) clean" diff --git a/fluent-dom/package.json b/fluent-dom/package.json index bde2500be..0dcc03681 100644 --- a/fluent-dom/package.json +++ b/fluent-dom/package.json @@ -1,5 +1,5 @@ { - "name": "fluent-dom", + "name": "@fluent/dom", "version": "0.5.0", "description": "Fluent bindings for DOM", "repository": { @@ -21,7 +21,7 @@ "directories": { "lib": "./src" }, - "main": "./fluent-dom.js", + "main": "./index.js", "module": "./src/index.js", "keywords": [ "localization",