This is a simple template to play with websockets, IPC (libipc) communications and Halogen. Nothing serious.
 
 
 
 
Go to file
Thomas Honeyman 93c34f2214
Update template for Halogen 5 and Spago (#23)
Update template for Halogen 5 and Spago
2020-05-10 10:32:46 -04:00
dist Update template for Halogen 5 and Spago (#23) 2020-05-10 10:32:46 -04:00
src Update template for Halogen 5 and Spago (#23) 2020-05-10 10:32:46 -04:00
test Update template for Halogen 5 and Spago (#23) 2020-05-10 10:32:46 -04:00
.gitignore Update template for Halogen 5 and Spago (#23) 2020-05-10 10:32:46 -04:00
.purs-repl Update template for Halogen 5 and Spago (#23) 2020-05-10 10:32:46 -04:00
.travis.yml Update template for Halogen 5 and Spago (#23) 2020-05-10 10:32:46 -04:00
LICENSE Initial commit 2016-01-18 21:19:35 +00:00
README.md Update template for Halogen 5 and Spago (#23) 2020-05-10 10:32:46 -04:00
entry.js Add a task for fast builds with `purs ide` & webpack 2017-09-23 19:11:01 +01:00
package.json Update template for Halogen 5 and Spago (#23) 2020-05-10 10:32:46 -04:00
packages.dhall Update template for Halogen 5 and Spago (#23) 2020-05-10 10:32:46 -04:00
spago.dhall Update template for Halogen 5 and Spago (#23) 2020-05-10 10:32:46 -04:00

README.md

Halogen Template

This is a template for starting a fresh project with the Halogen library for writing declarative, type-safe user interfaces.

You can learn more about Halogen with these resources:

You can chat with other Halogen users on the PureScript Discourse, or join the Functional Programming Slack (invite link) in the #purescript and #purescript-beginners channels.

Getting started

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

First, clone the repository and step into it:

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

Then, install the PureScript compiler, the Spago package manager and build tool, and Webpack bundler locally:

npm install

This will automatically trigger Spago to install the PureScript library dependencies for this project.

Building

You can now build the PureScript source code with:

# An alias for `spago build`
npm run build

You can produce a bundled JS file you can run in the browser with:

# An alias for `spago bundle-app --to dist/app.js`
npm run bundle

This deposits a bundled JS file named app.js in the dist directory. You can view your running Halogen app by opening the dist/index.html file.

Alternatively, if you use an editor that supports purs ide or if you are running pscid, then you can get near-instant builds of the app while you work:

npm run bundle:watch

⚠️ 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.