Git Product home page Git Product logo

halogen's Introduction

See the Official Halogen Template, which is more up to date and now incorporates much of this repo's content.

Quick Start

git clone https://github.com/purescript-templates/halogen.git myApp
cd myApp
npm install -g purescript spago parcel
npm run build
npm run serve

Introduction

This template for purescript-halogen v5 mimics the introductory example of the official React Hooks documentation.

Additional documentation for halogen can be found here:

Pursuit docs are not published yet, but you can build documentation locally with spago docs then open generated-docs/html/index.html.

More examples are available in the package repository.

If you notice any problems with the below setup instructions, or have suggestions on how to make the new-user experience any smoother, please create an issue or pull-request.

Compatible with PureScript compiler 13.6

Initial Setup

Install tools globally:

npm install -g purescript spago parcel

Initial compilation:

npm run build

Launch webapp:

npm run serve

Development Cycle

If you're using an editor that supports purs ide or are running pscid, you simply need to keep the previous npm run serve command running in a terminal. Any save to a file 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, or if you add, remove, or modify module names, then you will need to manually re-run npm run build.

Production

When you are ready to create a minified bundle for deployment, run the following command:

npm run build-prod

Parcel output appears in the ./dist/ directory.

You can test the production output locally with a tool like http-server. It seems that parcel should also be able to accomplish this, but it unfortunately will only serve development builds locally.

npm install -g http-server
http-server dist -o

If everything looks good, you can then upload the contents of dist to your preferred static hosting service.

Local Versioned Toolchain

If you'd prefer to install tools on a per-project basis (rather than globally) see this guide.

halogen's People

Contributors

milesfrain avatar

Stargazers

Benjamin Tong avatar KlarkC avatar Mark Eibes avatar George Thomas avatar hjmt avatar Drew Hess avatar Serhii Khoma avatar Michael Martin avatar

Watchers

 avatar

Forkers

gillchristian

halogen's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.