A compiler package for the Elm OpenComponents template, enabling Elm components within the OpenComponents ecosystem. Version 3.0.0 is the current stable release, with low release cadence. It provides integration via predefined Elm ports (getData, dataReceiver) and supports custom ports through a JavaScript entry file. Differentiators: official OC template for Elm, ESM-only, ships TypeScript types. Note: Marked as work-in-progress/not ready for production.
npm install oc-template-elm-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing the compile function and using it to compile an Elm component with options.
Check the latest documentation for updated options object shape.
Use import syntax or set { type: 'module' } in your package.json.Switch from require() to import statements.
Define ports as shown in README: port getData : E.Value -> Cmd msg etc.
Ensure you have oc-template-elm installed if you use this compiler.
npm install oc-template-elm
Add "type": "module" to package.json or use .mjs file extension
Use import { compile } from 'oc-template-elm-compiler'Add port getData : E.Value -> Cmd msg and port dataReceiver : (E.Value -> msg) -> Sub msg in Elm