Skip to content

Latest commit

History

History

front

Folders and files

NameName
Last commit message
Last commit date

parent directory

..

Try-phi frontend

This is a PureScript version of try-phi front end. Previously, it was written in Elm and Haskell (via Miso). It uses Halogen for UI.

Quick Start

  1. Install Nix

  2. Enter this directory

    git clone https://github.com/objectionary/try-phi
    cd try-phi/front
  3. Run project:

    nix run

    or

    nix develop
    npm run quick-start
    echo fs.inotify.max_user_watches=1000000 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
  4. Now, your browser will open, showing http://localhost:1234

Develop

  1. Run

    nix develop
    npm run dev

If you're using an editor that supports purs ide or are running pscid, you simply need to keep the previous npm run dev command running in a terminal. Any save to a file used in the project will trigger an incremental recompilation, rebundle, and web page refresh, so you can immediately see your changes.

If your workflow does not support automatic recompilation, then you will need to manually re-run npm run build. Even with automatic recompilation, a manual rebuild is occasionally required, such as when you add, remove, or modify module names, or notice any other unexpected behavior.

Deployment

  1. Produce the bundled and minified code at ./prod and see the app running in a browser via http-server:

    npm run build:prod
  2. Now, you may deploy your app to a static hosting service, e.g., GitHub Pages (see this post)