How ephf/just-jsx works
Just JSX compiles JSX syntax in browser scripts or through a command-line compiler. In the browser, a mutation observer detects scripts marked jsx, parses their contents, and marks them compiled; the runtime also provides JSX element creation and an asynchronous import helper. The CLI walks input files, parses JavaScript-family files and JSX script bodies in HTML, and writes results to an output directory. The README documents both browser use and directory/file compilation. The CLI’s required minified runtime file is not present in the supplied tree, so its linkage to the sampled runtime is shown as unverified.
Main entry points: jsx.js JSX parser · jsxc.js Compiler CLI
Components 11
Browser Runtime
- Script observer
src/jsx.js
CLI Compiler
- Compiler CLI
bin/jsxc.js
JSX Core
- JSX parser
src/jsx.js - Element factory
src/jsx.js - Async imports
src/jsx.js
Other components
- Page author
- Browser page
- Browser DOM
- CLI user
- Input and output files
- Module source
Connections 11
- Page author → Browser page: marks scripts
README.md - Browser page → Script observer: loads runtime
README.md - Script observer → JSX parser: parses scripts
src/jsx.js - Script observer → Browser DOM: observes and replaces
src/jsx.js - JSX parser → Element factory: emits calls
src/jsx.js - Element factory → Browser DOM: creates elements
src/jsx.js - Async imports → Module source: fetches source
src/jsx.js - Async imports → JSX parser: parses source
src/jsx.js - CLI user → Compiler CLI: runs compiler
README.md - Compiler CLI → Input and output files: reads and writes
bin/jsxc.js - Compiler CLI → JSX parser: parses content