{"_id":"@curtissimo/elm-hot","_rev":"3-0f21559754f61fd90984b06450b764ca","name":"@curtissimo/elm-hot","dist-tags":{"latest":"1.2.0"},"versions":{"1.1.7":{"name":"@curtissimo/elm-hot","version":"1.1.7","keywords":["Elm","HMR","hot","reload"],"author":{"name":"Keith Lazuka"},"license":"MIT","_id":"@curtissimo/elm-hot@1.1.7","maintainers":[{"name":"realistschuckle","email":"realistschuckle@gmail.com"}],"homepage":"https://gitlab.com/curtissimo/elm-hot#readme","bugs":{"url":"https://gitlab.com/curtissimo/elm-hot/issues"},"ava":{"files":["test/test.js"]},"dist":{"shasum":"cb377770c702e14fd83ea802a212c72e71d9c640","tarball":"https://registry.npmjs.org/@curtissimo/elm-hot/-/elm-hot-1.1.7.tgz","fileCount":52,"integrity":"sha512-zWNiKcV20QC9k6v9TxYtk9oYhVqTmtKZXO8Lt2R48AFln9lI7I9PK/zEknzLPDqAjCdz1ag+nl3+IPaFmoFQYw==","signatures":[{"sig":"MEUCIQD2iFD/+92QUoJKxOTMjx2+SrB7SSSAi+R+zdJ0xdwu+AIgUoE1MoMfuZ69AIzcZknRqYZG/Xu5lKw+KcvwW08GTZI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":94580},"main":"src/index.js","gitHead":"f352c537a8a3457033b43ff572a74d7925bce451","scripts":{"test":"./test.sh"},"_npmUser":{"name":"realistschuckle","email":"realistschuckle@gmail.com"},"repository":{"url":"git+https://gitlab.com/curtissimo/elm-hot.git","type":"git"},"_npmVersion":"10.9.4","description":"Hot code swapping for Elm","directories":{},"_nodeVersion":"22.21.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.4.1","express":"^5.2.1","chokidar":"^5.0.0","puppeteer":"^24.34.0","tap-xunit":"^2.4.1","elm-format":"^0.8.8"},"_npmOperationalInternal":{"tmp":"tmp/elm-hot_1.1.7_1767884091751_0.207620786146693","host":"s3://npm-registry-packages-npm-production"}},"1.1.8":{"name":"@curtissimo/elm-hot","version":"1.1.8","keywords":["Elm","HMR","hot","reload"],"author":{"name":"Keith Lazuka"},"license":"MIT","_id":"@curtissimo/elm-hot@1.1.8","maintainers":[{"name":"realistschuckle","email":"realistschuckle@gmail.com"}],"homepage":"https://gitlab.com/curtissimo/elm-hot#readme","bugs":{"url":"https://gitlab.com/curtissimo/elm-hot/issues"},"ava":{"files":["test/test.js"]},"dist":{"shasum":"4cefca05f778778cecc70c95f4d4a13128a3ae39","tarball":"https://registry.npmjs.org/@curtissimo/elm-hot/-/elm-hot-1.1.8.tgz","fileCount":52,"integrity":"sha512-tUJfnbtiUleSXmnBWbDE6Vb6GRwB+neqi9ZeavEiPHQUg1GeNysLbw97T795CD3O7jnMMINulX4+oEqSXyE1vw==","signatures":[{"sig":"MEUCIGjoyuhNNnQ+RirN5+X0wrXV3lU+QNX5pG3NAXNXl07BAiEAlSDolxDIL4rj7edGt8cUFF0VgyDIrH4Wvnbe37jBdbg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":94562},"main":"src/index.js","gitHead":"b577954a279b17d8ac75d853779270dbd610549e","scripts":{"test":"./test.sh"},"_npmUser":{"name":"realistschuckle","email":"realistschuckle@gmail.com"},"repository":{"url":"git+https://gitlab.com/curtissimo/elm-hot.git","type":"git"},"_npmVersion":"10.9.4","description":"Hot code swapping for Elm","directories":{},"_nodeVersion":"22.21.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.4.1","express":"^5.2.1","chokidar":"^5.0.0","puppeteer":"^24.34.0","tap-xunit":"^2.4.1","elm-format":"^0.8.8"},"_npmOperationalInternal":{"tmp":"tmp/elm-hot_1.1.8_1767884663000_0.7421279084581252","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@curtissimo/elm-hot","version":"1.2.0","description":"Hot code swapping for Elm","keywords":["Elm","HMR","hot","reload"],"author":{"name":"Keith Lazuka"},"maintainers":[{"name":"realistschuckle","email":"realistschuckle@gmail.com"}],"repository":{"type":"git","url":"git+https://gitlab.com/curtissimo/elm-hot.git"},"license":"MIT","main":"src/index.js","scripts":{"test":"./test.sh"},"ava":{"files":["test/test.js"]},"devDependencies":{"ava":"^6.4.1","chokidar":"^5.0.0","elm-format":"^0.8.8","express":"^5.2.1","puppeteer":"^24.34.0","tap-xunit":"^2.4.1"},"_id":"@curtissimo/elm-hot@1.2.0","gitHead":"3dea52bf5fb56d89681c09bf8f49139f59979392","bugs":{"url":"https://gitlab.com/curtissimo/elm-hot/issues"},"homepage":"https://gitlab.com/curtissimo/elm-hot#readme","_nodeVersion":"22.21.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-bcOxhw2U3riVF+xPRiwCHP8JCaO3PolVqk3eKA4xnvBo4RoMzjaHi2rVlPvFEnRn3eEJu8LN1Xpc1Rvw6p0ApQ==","shasum":"28ec1d11cdf78c5afc1eb6777c75381f3dfe6172","tarball":"https://registry.npmjs.org/@curtissimo/elm-hot/-/elm-hot-1.2.0.tgz","fileCount":6,"unpackedSize":26220,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC/WCUgthKLtFVTiJxDCx9NIDkaB/rNEM7rZBuoDw3xpwIhALrVCUbZoQdb7Boc8frpmapZc6ERdJm7cSzJCQuqXW0f"}]},"_npmUser":{"name":"realistschuckle","email":"realistschuckle@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/elm-hot_1.2.0_1767914132639_0.4427959036493414"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-08T14:54:51.650Z","modified":"2026-01-08T23:15:33.395Z","1.1.7":"2026-01-08T14:54:51.900Z","1.1.8":"2026-01-08T15:04:23.140Z","1.2.0":"2026-01-08T23:15:32.800Z"},"bugs":{"url":"https://gitlab.com/curtissimo/elm-hot/issues"},"author":{"name":"Keith Lazuka"},"license":"MIT","homepage":"https://gitlab.com/curtissimo/elm-hot#readme","keywords":["Elm","HMR","hot","reload"],"repository":{"type":"git","url":"git+https://gitlab.com/curtissimo/elm-hot.git"},"description":"Hot code swapping for Elm","maintainers":[{"name":"realistschuckle","email":"realistschuckle@gmail.com"}],"readme":"# @curtissimo/elm-hot\n\nThis package provides the core infrastructure needed for doing hot code swapping\nin Elm. It supports Elm 0.19.0 and 0.19.1 only.\n\n**This low-level package is intended for authors of Elm application servers.**\n\nThis package is primarily maintained for use with\n[Parcel](https://parceljs.org/) and its [built-in support for\nElm](https://parceljs.org/elm.html) which uses this package.\n\nThe goal of this package is to provide a reusable core that can be used to\nprovide hot code swapping support in a variety of environments.\n\n### Installing `elm-hot` core API\n\nThis really should only be a development dependency.\n\n```bash\n$ npm install --save-dev elm-hot\n```\n\n-------------------------------------------\n\n### Testing\n\nThese tests run against both Elm 0.19.0 and 0.19.1. Switching out binaries\nand modifying the `elm.json` file is a little bit of a chore, but do-able.\n\nThese integration tests are _sloooooow_, like it takes five minutes slow.\n\nOur goals with testing are:\n\n- Provide dockerized testing environments to isolate the various versions of the\n  Elm compiler\n- Increase the speed of the tests because ... well, five minutes ... that's a\n  long time\n\n-------------------------------------------\n\n### Core API\n\n**`function inject(str)`**\n\nInjects the hot code swapping functionality into a compiled Elm app.\n\n- Takes the Javascript code emitted by the Elm compiler as an input string\n- Returns a string containing the injected code ready to be evaluated in the\n  browser.  \n\n### Example of how the core API could be used \n\n```javascript\nconst elmHot = require('elm-hot');\nconst {compileToStringSync} = require('node-elm-compiler');\nconst injectedCode = elmHot.inject(compileToStringSync([\"src/Main.elm\"], {}));\n```\n\nIn order to provide something similar to `webpack-dev-server` with hot module\nreloading, an application server could be developed to do the following:\n\n- Serve a modified version of the developer's `index.html` to receive push\n  events from the server\n- Watch `.elm` files on disk for changes\n- Push a \"file changed\" event to the client notifying it that it should fetch\n  new code from the server\n- When the client receives the event:\n    - Fetch the new code (the server will re-compile the Elm code and use\n      `elm-hot` to inject the hot-code-swapping logic)\n    - The client deletes the old `Elm` object and injects the new code\n      from the server\n    \nKeith Lazuka implemented something similar to this for the integration tests.\nSee [test/server.js]() and [test/client.js]() for inspiration.\n\n-------------------------------------------\n\n### Attribution\n\nThis is an active fork of Keith Lazuka's\n[elm-hot](https://github.com/klazuka/elm-hot/) GitHub repository.\n\nElm hot code swapping is based on the work of Flux Xu's\n[elm-hot-loader](https://github.com/fluxxu/elm-hot-loader).\n","readmeFilename":"README.md"}