https://github.com/brucou/courtesan
Chrome devtool extension for debugging and tracing Kingly state machines
https://github.com/brucou/courtesan
Last synced: 4 months ago
JSON representation
Chrome devtool extension for debugging and tracing Kingly state machines
- Host: GitHub
- URL: https://github.com/brucou/courtesan
- Owner: brucou
- License: mit
- Created: 2020-05-10T23:59:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T00:17:43.000Z (over 5 years ago)
- Last Synced: 2025-07-10T19:58:40.266Z (5 months ago)
- Language: JavaScript
- Size: 963 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Motivation
This package supports the Kingly state machine library with a tracing extension. Kingly has a devtool which is very strongly inspired from the previous excellent work of Krasimir Tsonev with [Kuker](https://chrome.google.com/webstore/detail/kuker/glgnienmpgmfpkigngkmieconbnkmlcn).
Kingly developers must first download the [courtesan extension](https://chrome.google.com/webstore/search/courtesan) of the Chrome store. Then, for Kingly to send messages to the dev tool, you will need to create a Kingly state machine as follows:
```js
import {tracer} from "courtesan";
...
const fsm = createStateMachine(fsmDef, {debug:{console}, devTool:{tracer}});
```
As you can see, the `devTool` parameter admits the `tracer` property whose interface is implemented by the `courtesan` library.
# Screenshot

# Credit
This dev tool is extensively based on [prior art](https://github.com/krasimir/kuker) from [Krasimir Tsonev](https://krasimirtsonev.com/). Krasimir has a ton of nice software that can be used for fun and profit. He is als the author of the [Stent](https://www.smashingmagazine.com/2018/01/rise-state-machines/) state machine library (designed to integrate smoothly with Redux).