@lokale/core
v6.2.8
Published
Library providing ability to translate messages directly in context of developed application.
Maintainers
Readme
{% import "../../readmeMacros/macros.njk.md" as macros %}
{{ macros.header('Lokale JS Core', 'The Core of Lokale JS integrations', packageName) }}
What is Lokale JS Core?
It's the core library of Lokale JS integrations containing the platform-agnostic parts of the Lokale JS. For more information about Lokale JS integrations, visit the [docs]({{ macros.v5link() }}).
{{ macros.links() }}
You should not use this package directly for usage in the web browser
If you use Lokale on the web, use @lokale/web package, which extends this package with web-related functionality.
This package is platform-agnostic, so it contains only the most general functionality.
{{ macros.installation('core') }}
Usage
First, create a Lokale instance and run it.
import { LokaleCore } from "@lokale/core";
const tg = LokaleCore()
.use(...)
.init(...)
tg.run();To learn more, check [the docs]({{ macros.v5link() }}).
{{ macros.why() }}
Development
{{ macros.developmentInstallation() }} {{ macros.developmentCore() }}
{{ macros.developmentTesting('/packages/core') }}
End-to-end (e2e) testing
Each integration is end-to-end tested via cypress. The tests are defined in /e2e/cypress/e2e directory.
To run the e2e tests, run
pnpm run e2e run <integration>E.g.
pnpm run e2e run webTo open and play with e2e tests, run:
pnpm run e2e open <integration>{{ macros.contributors() }}
