mirror of
https://github.com/correl/riichi.git
synced 2024-12-18 11:06:20 +00:00
Add a basic Elm front-end
This commit is contained in:
parent
daa5662aae
commit
67e3d1928b
7 changed files with 78 additions and 8 deletions
7
Makefile
Normal file
7
Makefile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
all: elm
|
||||||
|
|
||||||
|
elm:
|
||||||
|
$(MAKE) $(MAKE_FLAGS) --directory priv
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(MAKE) clean $(MAKE_FLAGS) --directory priv
|
2
priv/.gitignore
vendored
Normal file
2
priv/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
index.html
|
||||||
|
elm-stuff
|
7
priv/Makefile
Normal file
7
priv/Makefile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
all: index.html
|
||||||
|
|
||||||
|
index.html:
|
||||||
|
elm-make --yes src/Riichi.elm --output=index.html --warn
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf elm-stuff index.html
|
15
priv/elm-package.json
Normal file
15
priv/elm-package.json
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"version": "1.0.0",
|
||||||
|
"summary": "helpful summary of your project, less than 80 characters",
|
||||||
|
"repository": "https://github.com/user/project.git",
|
||||||
|
"license": "BSD3",
|
||||||
|
"source-directories": [
|
||||||
|
"src"
|
||||||
|
],
|
||||||
|
"exposed-modules": [],
|
||||||
|
"dependencies": {
|
||||||
|
"elm-lang/core": "5.0.0 <= v < 6.0.0",
|
||||||
|
"elm-lang/html": "2.0.0 <= v < 3.0.0"
|
||||||
|
},
|
||||||
|
"elm-version": "0.18.0 <= v < 0.19.0"
|
||||||
|
}
|
|
@ -1,8 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Riichi Mahjong</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Riichi Mahjong</h1>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
37
priv/src/Riichi.elm
Normal file
37
priv/src/Riichi.elm
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
module Riichi exposing (..)
|
||||||
|
|
||||||
|
import Html exposing (..)
|
||||||
|
|
||||||
|
|
||||||
|
type alias Model =
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
type Msg
|
||||||
|
= Noop
|
||||||
|
|
||||||
|
|
||||||
|
init : ( Model, Cmd Msg )
|
||||||
|
init =
|
||||||
|
( {}, Cmd.none )
|
||||||
|
|
||||||
|
|
||||||
|
update : Msg -> Model -> ( Model, Cmd Msg )
|
||||||
|
update msg model =
|
||||||
|
( model, Cmd.none )
|
||||||
|
|
||||||
|
|
||||||
|
main : Program Never Model Msg
|
||||||
|
main =
|
||||||
|
program
|
||||||
|
{ init = init
|
||||||
|
, update = update
|
||||||
|
, view = view
|
||||||
|
, subscriptions = \_ -> Sub.none
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
view : Model -> Html Msg
|
||||||
|
view model =
|
||||||
|
div []
|
||||||
|
[ h1 [] [ text "Riichi Mahjong" ] ]
|
10
rebar.config
10
rebar.config
|
@ -1,5 +1,15 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
|
|
||||||
|
{pre_hooks,
|
||||||
|
[{"(linux|darwin|solaris)", compile,"make elm"},
|
||||||
|
{"(freebsd|netbsd|openbsd)",compile,"gmake elm"},
|
||||||
|
{"win32", compile,"make elm"},
|
||||||
|
{"(linux|darwin|solaris)", eunit, "make elm-test"},
|
||||||
|
{"(freebsd|netbsd|openbsd)",eunit, "gmake elm-test"},
|
||||||
|
{"win32", eunit, "make elm-test"},
|
||||||
|
{"(linux|darwin|solaris)", clean, "make clean"}
|
||||||
|
]}.
|
||||||
|
|
||||||
{relx, [{release, {riichi, "0.0.1"},
|
{relx, [{release, {riichi, "0.0.1"},
|
||||||
[riichi]},
|
[riichi]},
|
||||||
{dev_mode, true},
|
{dev_mode, true},
|
||||||
|
|
Loading…
Reference in a new issue