Skip to content

Commit

Permalink
add documentation and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
CSchank committed Nov 6, 2018
1 parent 31d854b commit a21ce22
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
17 changes: 7 additions & 10 deletions elm.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
{
"type": "package",
"name": "MacCASOutreach/graphicsvg",
"summary": "Library for creating SVG graphics",
"license": "BSD-3-Clause",
"version": "3.0.0",
"source-directories": [
"src"
],
"type": "package",
"name": "MacCASOutreach/graphicsvg",
"summary": "Library for creating SVG graphics",
"license": "BSD-3-Clause",
"version": "4.0.0",
"exposed-modules": [
"GraphicSVG",
"GraphicSVG.App"
],
"elm-version": "0.19.0 <= v < 0.20.0",
"elm-version": "0.19.0 <= v < 0.20.0",
"dependencies": {
"elm/browser": "1.0.0 <= v < 2.0.0",
"elm/core": "1.0.0 <= v < 2.0.0",
Expand All @@ -23,5 +20,5 @@
"elm/url": "1.0.0 <= v < 2.0.0",
"elm/virtual-dom": "1.0.0 <= v < 2.0.0"
},
"test-dependencies": {}
"test-dependencies": {}
}
5 changes: 5 additions & 0 deletions src/GraphicSVG.elm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ other applications including keyboard presses and mouse movements.
@docs App, app
# EllieApp
@docs EllieApp, ellieApp
# Stencils
@docs line, polygon, openPolygon, ngon, triangle, rightTriangle, isosceles, sideAngleSide, square, rect, rectangle, roundedRect, circle, oval, wedge
Expand Down
24 changes: 23 additions & 1 deletion src/GraphicSVG/App.elm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ and other applications including response to time, keyboard presses, and mouse a
@docs InputHandler, GetKeyState, Keys, KeyState
# Barebones app with keyboard and time
@docs AppWithTick, appWithTick
-}

import Browser exposing (UrlRequest(..))
Expand Down Expand Up @@ -709,11 +714,28 @@ hiddenGameUpdate userUpdate msg ( userModel, hiddenModel ) =
( ( userModel, hiddenModel ), Cmd.none )


{-| This type alias is only used as a target for a user `main` type signature to make
the type signature more clear and concise when `main` calls `gameApp`:
main : GameApp Model Msg
main =
appWithTick Tick
{ model = init
, update = update
, view = view
, subscriptions = subscriptions
, onUrlRequest = OnUrlRequest
, onUrlChange = OnUrlChange
}
where `Tick` is the message handler called once per browser window update,
`Model` is the type alias of the user persistent model, and
`Msg` is the name of the user message type; if other names are used,
they can be substituted for these names.
-}
type alias AppWithTick flags userModel userMsg =
App flags ( userModel, HiddenModel userMsg ) (HiddenMsg userMsg)


{-
{-|
A GraphicSVG.app with automatic time and keyboard presses passed into the update function.
`appWithTick` takes two parameters: one is your own type of `InputHandler` message
which will be automatically called each time the browser window is refreshed
Expand Down

0 comments on commit a21ce22

Please sign in to comment.