doc: add project example to readme
This commit is contained in:
parent
284a7a45e3
commit
e36d9f8544
5 changed files with 82 additions and 2 deletions
3
Makefile
3
Makefile
|
@ -5,7 +5,8 @@ NPM_PUB := npm publish
|
|||
|
||||
D2 := nix run git+https://git.pleshevski.ru/mynix/tools\\\#d2 --
|
||||
DIAGRAMS := \
|
||||
turnstile
|
||||
turnstile \
|
||||
project
|
||||
|
||||
turnstile_theme_args := --layout elk --theme 101
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ const sm = new StateMachineBuilder()
|
|||
.build(locked);
|
||||
```
|
||||
|
||||
You can find the full example in the [examples](./examples/) folder.
|
||||
You can find more examples [here](./examples/README.md)
|
||||
|
||||
# Installation
|
||||
|
||||
|
|
26
assets/project.d2
Normal file
26
assets/project.d2
Normal file
|
@ -0,0 +1,26 @@
|
|||
direction: right
|
||||
|
||||
Project: {
|
||||
pen: Pending {
|
||||
shape: circle
|
||||
}
|
||||
act: Active {
|
||||
shape: circle
|
||||
style.fill: "#9ae49a"
|
||||
}
|
||||
com: Completed {
|
||||
shape: circle
|
||||
style.fill: "#eaea7e"
|
||||
}
|
||||
arc: Archived {
|
||||
shape: circle
|
||||
style.fill: "#ff7e7e"
|
||||
}
|
||||
|
||||
pen -> act: Activate
|
||||
pen -> arc: Archive
|
||||
|
||||
act -> com: Complete
|
||||
|
||||
arc -> pen: Restore
|
||||
}
|
43
assets/project.svg
Normal file
43
assets/project.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 471 KiB |
|
@ -15,3 +15,13 @@ passes through, the arms are locked again until another coin is inserted.
|
|||
```sh
|
||||
deno run ./examples/turnstile.ts
|
||||
```
|
||||
|
||||
## Project
|
||||
|
||||
This is more complex example illustrate all features of this library
|
||||
|
||||
![Project diagram](https://git.pleshevski.ru/pleshevskiy/it-fsm/raw/branch/main/assets/project.svg)
|
||||
|
||||
```sh
|
||||
deno run ./examples/project.ts
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue