halogen-websocket-ipc-playzone/README.md

57 lines
1.6 KiB
Markdown
Raw Normal View History

2016-01-18 22:17:22 +01:00
# purescript-halogen-template
2016-11-06 19:50:00 +01:00
[![Dependency status](https://img.shields.io/librariesio/github/slamdata/purescript-halogen-template.svg)](https://libraries.io/github/slamdata/purescript-halogen-template)
2016-01-18 22:17:22 +01:00
This is a template for starting a fresh project using the [purescript-halogen](https://github.com/slamdata/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.
2017-02-28 01:31:13 +01:00
In the PureScript ecosystem [Bower](http://bower.io/) 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:
2016-01-18 22:17:22 +01:00
``` shell
npm install --global bower
```
## Getting started
First clone the repo and step into it:
``` shell
git clone https://github.com/slamdata/purescript-halogen-template.git my-halogen-project
cd my-halogen-project
```
2017-02-28 01:31:13 +01:00
If you don't already have a global installation of the PureScript compiler and [Pulp](https://github.com/bodil/pulp) (or you want a local installation with the appropriate versions) you can run:
2016-01-18 22:17:22 +01:00
``` shell
2017-02-28 01:31:13 +01:00
npm install
2016-01-18 22:17:22 +01:00
```
2017-02-28 01:31:13 +01:00
Finally you'll need to install the PureScript library dependencies for this project with Bower:
2016-01-18 22:17:22 +01:00
``` shell
2017-02-28 01:31:13 +01:00
bower install
2016-01-18 22:17:22 +01:00
```
## Building
The project can now be built with:
``` shell
npm run build
```
2017-02-28 01:31:13 +01:00
This will build the PureScript source code and produce a bundled JS file as `dist/app.js`.
2016-01-18 22:17:22 +01:00
This is an alias for the Pulp command:
``` shell
2017-02-28 01:31:13 +01:00
pulp build --to dist/app.js
2016-01-18 22:17:22 +01:00
```
If you open `dist/index.html` you should now have a basic working Halogen app.
2016-01-18 22:17:22 +01:00
That's pretty much it. Have fun with Halogen!