[migration/ilib-js-to-dart] bump iLib to v15.0.0, minify locale JSON, and add ilib-assemble generator script - #96
Merged
Conversation
New script that generates the hierarchical JSON locale files used by the pure-Dart ILibLoader, using iLib's assembleData/assemble.mjs with splitByLocale=true. Requires --ilib-path pointing to the local iLib source tree (assembleData/assemble.mjs is not in the published npm package). Updates README.md to document both scripts side-by-side.
…le CLI Rework generate_locale_json.sh to drive the published ilib-assemble CLI (--mergeJson --splitByLocale) instead of copying iLib's assemble.mjs out of a required local source tree. ilib is now downloaded from npm by default (--ilib-version to pin, --ilib-path to reuse an existing tree), and a --compressed flag selects minified output. Regenerate all assets/locale/*.json with --compressed: the committed files are now minified (one line each). Content is unchanged — only the whitespace differs. Update the README to document the CLI-based flow and add a build/ + node_modules/ .gitignore for the throwaway install dir.
seonmiJin
reviewed
Aug 4, 2026
Verify that js/locale/ exists when --ilib-path points to an iLib source checkout. Without this directory (produced by 'ant build'), ilib-assemble fails with cryptic errors. Exit early with a clear message instructing the user to build iLib first.
seonmiJin
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
The following lists affects Pub Points on pub.dev when the package is published.
dart formatcommand.Upgrade the bundled iLib locale data from v14.22.0 to v15.0.0 and introduce a reproducible script for
regenerating
assets/locale/JSON using the publishedilib-assembleCLI.Changes
Locale data generator (
scripts/assemble_ilib/)generate_locale_json.sh— drives theilib-assembleCLI with
--mergeJson --splitByLocaleto produce one JSON file per locale level (root, language, region,script)
--ilib-versionto pin a release,--ilib-pathto reuse a local tree,--compressedforminified output,
--dry-runfor previewing without modifying assetsbuild/directory (git-ignored) — no global install requiredilib-inc.js,locales.json)iLib version bump (v14.22.0 → v15.0.0)
assets/locale/*.jsonfiles with--compressed(minified, content unchanged exceptfor upstream data updates from iLib v15.0.0)
getILibVersioninlib/flutter_ilib.dartCLAUDE.mdandREADME.mdHow to regenerate locale data
cd scripts/assemble_ilib ./generate_locale_json.sh --compressed (./generate_locale_json.sh --ilib-version 15.0.0 --compressed)