npm i immaculata
# Developer experience (DX) primitives
-
Use Module reloading (HMR) hooks in Node.js's native module system
-
Use JSX module transpilation hooks in Node.js's native module system
-
Use FileTree to load a file tree from disk into memory
-
Use DevServer to serve an in-memory file tree
-
Use generateFiles to write an in-memory file tree to disk
-
Use Pipeline to conveniently transform an in-memory file tree
# Module hot-reloading in Node.js
import { FileTree, hooks } from 'immaculata' import { registerHooks } from 'module' // keep an in-memory version of file tree under "./src" const tree = new FileTree('src', import.meta.dirname) // invalidate modules under "src" when they change registerHooks(hooks.useTree(tree)) // keep it up to date tree.watch().on('filesUpdated', doStuff) doStuff() // importing modules under 'src' now re-executes them async function doStuff() { const { stuff } = await import("src/dostuff.js") // "stuff" is never stale }Learn more about enabling native HMR
# Native JSX in Node.js
import { hooks } from 'immaculata' import { registerHooks } from 'module' // compile jsx using something like swc or tsc registerHooks(hooks.compileJsx(compileJsxSomehow)) // remap "react-jsx/runtime" to any import you want (optional) registerHooks(hooks.mapImport('react/jsx-runtime', 'immaculata/jsx-strings.js')) // you can now import tsx files! const { template } = await import('./site/template.tsx')Learn more about enabling native JSX
# Check out some recipes
# License
MIT License Copyright (c) 2025 @thesoftwarephilosopher Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.# Special thanks
This project was made possible by Jesus, Mary, and Joseph.
.png)

