mix tesseract_js.install_assets (tesseract_js v0.1.0)

Copy Markdown View Source

Copies the package's bundled JS files (tesseract.min.js, worker.min.js, tesseract_js.umd.js) into your app's priv/static/assets/vendor/tesseract/, so Phoenix's static plug can serve them at the paths the HEEx components emit.

Run this once after adding tesseract_js to your deps:

mix deps.get
mix tesseract_js.install_assets

When to re-run

Re-run after upgrading the tesseract_js package — the bundled tesseract.min.js, worker.min.js, or the wrapper UMD may have changed.

Options

  • --out — output dir (defaults to priv/static/assets/vendor/tesseract).
  • --force — overwrite existing files even if identical.

Why a copy step?

Phoenix only serves files from the host app's priv/static/ — dependencies' priv/static/ directories aren't auto-mounted. Copying is the simplest, most explicit way to surface the files without endpoint config changes.