Skip to content

A template repository for modelling Haskell boardgames with web UIs

Notifications You must be signed in to change notification settings

Boardgame-DSL/Web-Boardgame-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Web Boardgame Template

This is a template repository that can give you a start in modelling a boardgame with a web UI.

Besides the necessary parts of the Haskell model, this template also contains the basis for a web UI build with WebPack.

Cloning

To get your own copy of this repository you should "clone" it in one of the following ways:

GitHub

Click the "Use this template" button and follow the instructions.

Use this template button
From GitHub Docs: Creating a repository from a template

GitHub CLI

If you are use the GitHub CLI you can enter the following command:

gh repo create <repo-name> --template Boardgame-DSL/Web-Boardgame-Template

Without GitHub

If you don't use GitHub, you can simply download the template as a zip or a tarball.

Usage

This template uses Cabal, npm, and WebPack, familiarize yourself with these tools on their respective web pages.

Before you start coding you should probably customize the project files so that they match you project.

Building Haskell targeting WASM

To build the Haskell model targeting WebAssembly you'll need a special compiler, the god old GHC can't help you here. This other tool is called asterius and is most easily used in a docker container.

More information about how build targeting WASM can be found in HOW-TO-WASM.md.

Using WebPack

In the view of this project we have a npm project. To get started with that, run npm install. Write HTML in view/index.html and JavaScript in the view/src folder (starting in the view/src/index.js file). use npm start to open a local development server (standard on port 9090, change the in view/webpack.config.js), and npm run build to produce exportable HTML and JavaScript files in the dist folder.

About

A template repository for modelling Haskell boardgames with web UIs

Topics

Resources

Stars

Watchers

Forks