Skip to content

Commit

Permalink
text in steps
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrJustyna committed Mar 12, 2024
1 parent f43e8c5 commit 9b2e513
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions HelloWorld.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ stepShape :: Double -> Diagram B
stepShape x = rect 0.95 0.4 # showOrigin # named x

startShape :: Double -> Diagram B
startShape x = text "hello" <> roundedRect 0.95 0.4 0.5 # showOrigin # named x
startShape x = text "start" # fontSize (local 0.1) # light # font "courier" <> roundedRect 0.95 0.4 0.5 # showOrigin # named x

endShape :: Double -> Diagram B
endShape = startShape
endShape x = text "end" # fontSize (local 0.1) # thinWeight # font "courier" <> roundedRect 0.95 0.4 0.5 # showOrigin # named x

uniqueName :: Double -> Double -> Double
uniqueName x y = x * 10 + (abs y)
Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@

## development environment

* start - `./start.sh`
* start - `./host.sh`
* exit - `exit`

## hello world

* `cabal update`
* `cabal install --lib diagrams`
* `cabal install --lib diagrams-lib`
* `cabal install --lib diagrams-svg`
* `cabal install --lib base`
* `ghc HelloWorld.hs`
* `./HelloWorld -o hello-world.svg -w 400`
* `ghc HelloWorld.hs && ./HelloWorld -o hello-world.svg -w 400`

![hello-world](./hello-world.svg)

Expand Down
15 changes: 13 additions & 2 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.19.1

WORKDIR "/root/code/drakon"
WORKDIR "/root/code/drakon-renderer"

RUN \
apk update \
Expand All @@ -13,6 +13,17 @@ RUN \
g++ \
ghc \
cabal && \
git config --global --add safe.directory "/root/code/drakon"
git config --global --add safe.directory "/root/code/drakon-renderer"

RUN \
cabal update \
&& \
cabal install --lib diagrams \
&& \
cabal install --lib diagrams-lib \
&& \
cabal install --lib diagrams-svg \
&& \
cabal install --lib base

CMD [ "/bin/sh" ]
Loading

0 comments on commit 9b2e513

Please sign in to comment.