purescripthalogen

Use purescript-halogen (with pulp)


Following PureScript by Example, I'm using pulp for installing packages.

Halogen requires virtual-dom as extra dependency. From the documentation and the example packages, it seems to me that adding it involves a bunch of build tools that I haven't used before (gulp, webpack, bower, etc.). I downloaded the examples and tried to run them with npm install & npm run example but I got unknwon module errors.

So, I'd like to know a minimal viable way to install halogen into a new pulp project (which hopefully doesn't require me to delve into the slew of build tools, or at least not for small projects).


Solution

  • I think you should be able to build it with pulp browserify --to some-file.js - the Browserify option is there for situations like this, where you want to produce a single JS file from a collection of CommonJS modules that may include npm dependencies.