Repository navigation
Minor Changes
-
3ad1490: Expose the extractor as a library, not just a CLI.
- Declare an
exportsmap, so@labdigital/intl-extractorcan be imported.dist/index.jswas already built and shipped; nothing referenced it. - Add
buildLabels({ input, source, fallback, onFile }), which returns the label tree without touching the output file.processFilesbecomes the read-merge-write wrapper around it. - Add a
fallbackoption for labels with no value in the source. It receives the full key path and defaults to the label name, so existing behaviour is unchanged.
Two fixes while in there:
processFilesdid notawaitits write, and its "no existing source file" branch was unreachable because the read threw first. - Declare an