This is a simple template to play with websockets, IPC (libipc) communications and Halogen. Nothing serious.
 
 
 
 
Go to file
Jamie Ballingall b536b55840 Remove xmlns:foo=... from index.html 2018-12-15 12:05:21 -05:00
dist Remove xmlns:foo=... from index.html 2018-12-15 12:05:21 -05:00
src Update dependencies for PureScript 0.12 2018-07-27 19:14:36 +02:00
.gitignore Update dependencies for PureScript 0.12 2018-07-27 19:14:36 +02:00
.travis.yml Update dependencies for PureScript 0.11 2017-04-22 10:07:18 -05:00
LICENSE Initial commit 2016-01-18 21:19:35 +00:00
README.md Add a task for fast builds with `purs ide` & webpack 2017-09-23 19:11:01 +01:00
bower.json Update dependencies for PureScript 0.12 2018-07-27 19:14:36 +02:00
entry.js Add a task for fast builds with `purs ide` & webpack 2017-09-23 19:11:01 +01:00
package.json Update dependencies for PureScript 0.12 2018-07-27 19:14:36 +02:00

README.md

purescript-halogen-template

This is a template for starting a fresh project using the purescript-halogen library for declarative user interfaces.

Prerequisites

This guide assumes you already have Git and Node.js installed with npm somewhere on your path.

In the PureScript ecosystem Bower is currently the most commonly used package manager and we'll be relying on it for this project, so if you don't already have it, you can install it like this:

npm install --global bower

Getting started

First clone the repo and step into it:

git clone https://github.com/slamdata/purescript-halogen-template.git my-halogen-project
cd my-halogen-project

If you don't already have a global installation of the PureScript compiler and Pulp (or you want a local installation with the appropriate versions) you can run:

npm install

Finally you'll need to install the PureScript library dependencies for this project with Bower:

bower install

Building

The project can now be built with:

npm run build

This will build the PureScript source code and produce a bundled JS file as dist/app.js.

This is an alias for the Pulp command:

pulp build --to dist/app.js

If you open dist/index.html you should now have a basic working Halogen app.

You can also use the command:

npm run watch

To start a process that will watch the source files and trigger a reload whenever they are modified. Alternatively...

Fast watching with purs ide

If you're using an editor that supports purs ide or running pscid there's an option for getting near-instant builds of the app while you work on it:

npm run watch-fast

This will start a watch process that uses Webpack to rebundle the app whenever the output files are changed. Since purs ide rebuilds modules on save, this means you can use this much faster bundle-only rebuild script.

⚠️ purs ide only rebuilds one module at a time, so sometimes the bundle will end up in an inconsistent state, resulting in runtime errors. This occurs when a change is made in one module that breaks other modules that depend on it. The solution is to run a full build when a change like this is made, as the compiler will force you to resolve those errors.