This is a simple template to play with websockets, IPC (libipc) communications and Halogen. Nothing serious.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Thomas Honeyman 93c34f2214
Update template for Halogen 5 and Spago (#23)
4 years ago
dist Update template for Halogen 5 and Spago (#23) 4 years ago
src Update template for Halogen 5 and Spago (#23) 4 years ago
test Update template for Halogen 5 and Spago (#23) 4 years ago
.gitignore Update template for Halogen 5 and Spago (#23) 4 years ago
.purs-repl Update template for Halogen 5 and Spago (#23) 4 years ago
.travis.yml Update template for Halogen 5 and Spago (#23) 4 years ago
LICENSE Initial commit 8 years ago
README.md Update template for Halogen 5 and Spago (#23) 4 years ago
entry.js Add a task for fast builds with `purs ide` & webpack 7 years ago
package.json Update template for Halogen 5 and Spago (#23) 4 years ago
packages.dhall Update template for Halogen 5 and Spago (#23) 4 years ago
spago.dhall Update template for Halogen 5 and Spago (#23) 4 years ago

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.