yomitan_anki_conf

Building Flib-club from source

This document is for AMO reviewers who rebuild the submitted Firefox extension. It follows Mozilla’s source code submission requirements.

Tested build environment

Component Version
OS Linux. CI uses Ubuntu 24.04 (x86-64)
Node.js 22.x (CI), 24.x, 26.x
npm The one bundled with Node
Disk About 1 GB

Node 24 needs no extra setup. It was tested on x86-64, not on ARM64; the only native build dependency is esbuild, which has an ARM64 package in the lockfile. All tools are open-source npm packages pinned by package-lock.json.

The build needs network access for npm ci and npm run license-report:html. Without network the report still exits with 0, but ext/legal-npm.html then differs from the submitted file.

To install Node, use https://nodejs.org/en/download/ or nvm (nvm install 24).

Build

From the root of the unzipped source archive, using the version you are reviewing (here 0.4.2, always written with 4 segments):

npm ci
npm run license-report:html
npm run build -- --target firefox --version 0.4.2.0

The AMO submission is builds/yomitan-firefox.zip.

Do not use scripts/build-all.sh: it also builds the dictionaries from private source data, which the extension does not contain.

Check the result

Compare the unpacked trees, not the zip files:

mkdir submitted rebuilt
unzip -q /path/to/submitted.zip -d submitted
unzip -q builds/yomitan-firefox.zip -d rebuilt
diff -r submitted rebuilt

No output means every file is identical. This was checked on v0.4.1: a build from git archive on Node 24 and Node 26 matched the CI build on Node 22 in all 477 files.

What the build does

The version in package.json is 0.0.0 by design. The real version comes from --version.

No obfuscation

The code is not obfuscated. Files under ext/js/ are shipped as written. ext/lib/ holds third-party libraries bundled from node_modules; AMO needs the source archive because of them.

Source archive provenance

The archive is git archive --format=zip --prefix=flib-club-<version>/ v<version> from https://github.com/xxxvita/yomitan_anki_conf. To cross-check, clone that repository at the same tag.