Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bbarker/purescript-concur-adventure
Choose your own adventure, with Concur
https://github.com/bbarker/purescript-concur-adventure
concur purescript-concur
Last synced: 13 days ago
JSON representation
Choose your own adventure, with Concur
- Host: GitHub
- URL: https://github.com/bbarker/purescript-concur-adventure
- Owner: bbarker
- License: mit
- Created: 2020-10-10T13:27:18.000Z (about 4 years ago)
- Default Branch: react
- Last Pushed: 2023-01-07T21:42:33.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T06:08:02.689Z (7 months ago)
- Topics: concur, purescript-concur
- Language: PureScript
- Homepage: https://bbarker.github.io/purescript-concur-adventure/
- Size: 1.65 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Purescript Concur Adventure
A starter kit for making choose-your-own-adventure experiences
with PureScript-Concur. These experiences could be games or simple
stories. The [current demo](https://bbarker.github.io/purescript-concur-adventure/) is relatively simple, though it does use
markup instead of plain text.Uses Npm, Spago, Google Closure Compiler, and Parcel. Builds tiny 180KB uncompressed bundles!
## Usage
The experiences are optionally path-dependent, as the `nextPage` can depend
on an `Array n` of past events of type `n`. Additionally, they can
depend on data of type `d`, if it exists.Other than implementing instances of `StoryPage`, the user may want
change the `runPage` function to configure how subsequent pages
are displayed (e.g. how many, what order, etc); currently the
default is to show the complete history, starting with the most
recent page first.### Grab the code
This is a template repository, so just click the "Use this template"
button above.### Build code
> npm install
> npm run dev
### Run Dev Server
> npm start
## Hot code reload with PureScript code
At the end of the previous command, you will have a development server
which will watch for changes, and automatically reload the web page.
This mechanism only works with JS changes.However, in practice, your IDE should automatically recompile PureScript to
Javascript on every change, which will be picked up by the development server.
So you get immediate recompilation even with PureScript.### Build production artifacts
> npm run prod