Repository navigation
Watcher
estrogen --watch keeps estrogen running and re-obfuscates on each change,
instead of running it once per build by hand. It is the standalone watcher; the
dev-server hot reload each bundler offers is a separate integration (see the end
of this page).
Run it next to a bundler in watch mode. The bundler rebuilds the dist when you edit a source file; estrogen watches that dist and re-runs its pass on the new output, so the served files stay obfuscated without a manual step between the two.
estrogen --watch distIt runs one pass up front, then watches until you stop it with Ctrl-C.
estrogen rewrites files in place and is not idempotent, but it skips a file that already carries its marker. So a re-run only obfuscates the chunks the bundler just wrote fresh, and leaves the ones it already did. estrogen's own writes are marked, so a pass triggered by them finds nothing to do and the watch settles rather than wrapping its output twice.
A burst of writes from one rebuild is coalesced over a short quiet period, so a rebuild that writes many files is one estrogen pass, not one per file. A pass that fails (a parse error caught mid-write, say) is reported and the watch keeps running, so a transient error does not end the session.
estrogen build --watch watches each dist and the from source of every
[[vendor]] input, so editing a vendored package re-runs the vendor and
obfuscate step too.
estrogen build -c estrogen.toml --watch distSee Vendoring for the [[vendor]] inputs.
The watcher above is a standalone process. Hot reload through a bundler's own dev
server (Vite, Rollup) is a separate plugin integration and is not wired yet; the
build plugins run estrogen on build, not in serve. Until it lands, run
estrogen --watch alongside the dev server.
The limit is the same in watch mode: this raises the cost of reading the build, it is not secrecy. See Security and limits.
@sysce/estrogen ·
Fracital/estrogen · ISC · by David Reed.
estrogen raises the cost of reading a build; it does not make it secret.