Example WWW applications for Top, the type oriented protocol.
JavaScript Haskell CSS Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
src/GHCJS
test
www
LICENSE
Makefile
README.md
Setup.hs
stack.yaml
top-apps-ghcjs.cabal

README.md

Example WWW applications for top, using ghcjs.

Applications:

GHCJS setup

Some versions of stack do not build ghcjs correctly so upgrade to the latest stack:

stack upgrade

Then to setup the ghcjs environment:

stack setup

This is going to take a looong time but needs to be done only once.

If you get an error similar to this:

user error (The package 'Cabal' requires Cabal library version -any && >=1.10
but no suitable version is installed.)        

Get the very latest stack from github, and retry:

git clone https://github.com/commercialhaskell/stack.git;cd stack;stack build;stack install

Development

To automatically recompile the code of one of the applications, after every change, for example for the ui app:

cd www/ui
make dev

You can then open and use locally the apps in your browser:

  • chat at www/chat/index-dev.html
  • uiat www/ui/index-dev.html
Deployment

To produce a final, optimised version, ready for deployment on a web site.

First of all, install the closure compiler:

npm install closurecompiler -g

Then:

cd www/ui
make

You can then upload the app's www subdirectory to any web site and access the app via the index.html file, for example: quid2.org/app/ui.