@sphinxjs/sphinx
v0.0.1
Published
Meta-package that re-exports the entire Sphinx public API from a single entry point. Convenient for applications that use most of the library and do not need fine-grained tree-shaking.
Readme
@sphinxjs/sphinx
Meta-package that re-exports the entire Sphinx public API from a single entry point. Convenient for applications that use most of the library and do not need fine-grained tree-shaking.
Install
pnpm add @sphinxjs/sphinxWhat is included
| Export source | Key exports |
| --------------------------- | ------------------------------------------------------------------------------------------------------ |
| @sphinxjs/core | Sphinx, initSphinx, getSphinx, all types |
| @sphinxjs/loader | getGlobTranslations |
| @sphinxjs/utilities | loadSphinx |
| @sphinxjs/format | format |
| @sphinxjs/detect-locale | detectLocale |
| @sphinxjs/gettext | gettext, ngettext, pgettext, _, … (all variants) |
| @sphinxjs/label | unboundTranslateLabel, unboundNormaliseLabel |
| @sphinxjs/react | SphinxProvider, useGettext, useTranslatedLabel, useNormalisedLabel, getUseBoundDomainGettext |
| @sphinxjs/extractor | extract |
| @sphinxjs/extractor-astro | AstroParser, astroTypescriptExtractor |
When to use individual packages instead
Use the individual packages when:
- You are building a library and want to keep your peer-dependency surface minimal.
- You want the smallest possible bundle and only need one or two packages.
- You are using
@sphinxjs/extractorin a build script and do not want runtime dependencies pulled in.
