Skip to content

Commit 62e0cd4

Browse files
gcsolaroliGiulio Cesare Solarolimilesfrain
authored
Implementation of the HelloWorld receipt using Concur (#166)
* Implementation of the HelloWorld receipt using Concur * Update recipes/HelloConcur/README.md Co-authored-by: milesfrain <[email protected]> * Fixed readme Fixed readme applying the `make readme` command. Co-authored-by: Giulio Cesare Solaroli <[email protected]> Co-authored-by: milesfrain <[email protected]>
1 parent 794c684 commit 62e0cd4

File tree

7 files changed

+61
-0
lines changed

7 files changed

+61
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Running a web-compatible recipe:
102102
| | :heavy_check_mark: | [FormsReactHooks](recipes/FormsReactHooks) | A React port of the ["User Interface - Forms" Elm Example](https://elm-lang.org/examples/forms). |
103103
| | :heavy_check_mark: | [GroceriesHalogenHooks](recipes/GroceriesHalogenHooks) | A Halogen port of the ["HTML - Groceries" Elm Example](https://elm-lang.org/examples). |
104104
| | :heavy_check_mark: | [GroceriesReactHooks](recipes/GroceriesReactHooks) | A React port of the ["HTML - Groceries" Elm Example](https://elm-lang.org/examples). |
105+
| | :heavy_check_mark: | [HelloConcur](recipes/HelloConcur) | A Concur port of the ["HTML - Hello" Elm Example](https://elm-lang.org/examples/hello). |
105106
| | :heavy_check_mark: | [HelloHalogenHooks](recipes/HelloHalogenHooks) | A Halogen port of the ["HTML - Hello" Elm Example](https://elm-lang.org/examples). |
106107
| | :heavy_check_mark: | [HelloReactHooks](recipes/HelloReactHooks) | A React port of the ["HTML - Hello" Elm Example](https://elm-lang.org/examples). |
107108
| :heavy_check_mark: | :heavy_check_mark: | [HelloWorldLog](recipes/HelloWorldLog) | This recipe shows how to run a simple "Hello world!" program in either the node.js or web browser console. |

recipes/HelloConcur/.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/bower_components/
2+
/node_modules/
3+
/.pulp-cache/
4+
/output/
5+
/generated-docs/
6+
/.psc-package/
7+
/.psc*
8+
/.purs*
9+
/.psa*
10+
/.spago
11+
/.cache/
12+
/dist/
13+
/web-dist/
14+
/prod-dist/
15+
/prod/

recipes/HelloConcur/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# HelloConcur
2+
3+
A Concur port of the ["HTML - Hello" Elm Example](https://elm-lang.org/examples/hello).
4+
5+
## Expected Behavior:
6+
7+
### Browser
8+
9+
The browser will display "Hello!" as an html element.

recipes/HelloConcur/spago.dhall

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{ name = "HelloConcur"
2+
, dependencies =
3+
[ "console"
4+
, "effect"
5+
, "concur-react"
6+
, "psci-support"
7+
]
8+
, packages = ../../packages.dhall
9+
, sources = [ "recipes/HelloConcur/src/**/*.purs" ]
10+
}

recipes/HelloConcur/src/Main.purs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module HelloConcur.Main where
2+
3+
import Prelude
4+
import Effect (Effect)
5+
import Concur.React.Run (runWidgetInDom)
6+
import Concur.React.DOM (text)
7+
8+
main :: Effect Unit
9+
main = do
10+
runWidgetInDom "app" (text "Hello!")

recipes/HelloConcur/web/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>Hello Concur</title>
7+
</head>
8+
9+
<body>
10+
<div id="app"></div>
11+
<script src="./index.js"></script>
12+
</body>
13+
14+
</html>

recipes/HelloConcur/web/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";
2+
require("../../../output/HelloConcur.Main/index.js").main();

0 commit comments

Comments
 (0)