working template

This commit is contained in:
setop 2023-07-14 09:47:05 +02:00
commit 6a6d612acb
10 changed files with 142 additions and 0 deletions

1
.tool-versions Normal file
View File

@ -0,0 +1 @@
python 3.11.4

18
README.md Normal file
View File

@ -0,0 +1,18 @@
# cookiecutter-elm
[cookiecutter](https://github.com/audreyr/cookiecutter)
## Requires
* Python
* Cookiecutter
* Elm
## Use cookiecutter-elm
`cookiecutter https://git.zoocoop.com/setop/cookiecutter-elm`
## instructions
see cmd.txt file

17
cmd.txt Normal file
View File

@ -0,0 +1,17 @@
# install venv
python -m venv .venv
. .venv/bin/activate
pip install -U pip
pip install -r requirements.txt
# run template
cookiecutter .
# clean
deactivate
rm -rf .venv
rm -rf \{\{cookiecutter.app_name\}\}/
rm -rf .git
cd simpleapp

3
cookiecutter.json Normal file
View File

@ -0,0 +1,3 @@
{
"app_name": "simpleapp"
}

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
cookiecutter

1
{{cookiecutter.app_name}}/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
elm-stuff

View File

@ -0,0 +1 @@
elm 0.19.1

View File

@ -0,0 +1,23 @@
# A simple Elm app
Basic Elm code lives in `src/Main.elm` and relies on the [elm/html][html] library.
## Build Instructions
Run the following command from the root of this project:
```bash
elm make src/Main.elm --output index.html
```
Open `index.html` in your browser.
## Start a development server
Run the following command from the root of this project:
```bash
elm reactor
```
Visit `http://localhost:8000` to see your project dashboard.

View File

@ -0,0 +1,24 @@
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"elm/browser": "1.0.2",
"elm/core": "1.0.4",
"elm/html": "1.0.0"
},
"indirect": {
"elm/json": "1.1.3",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2"
}
},
"test-dependencies": {
"direct": {},
"indirect": {}
}
}

View File

@ -0,0 +1,53 @@
module Main exposing (..)
import Browser
import Html exposing (Html, h1, text)
---- MODEL ----
type alias Model =
{}
init : ( Model, Cmd Msg )
init =
( {}, Cmd.none )
---- UPDATE ----
type Msg
= NoOp
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
( model, Cmd.none )
---- VIEW ----
view : Model -> Html Msg
view model =
h1 [] [ text "Your Elm app '{{cookiecutter.app_name}}' is working!" ]
---- PROGRAM ----
main : Program () Model Msg
main =
Browser.element
{ view = view
, init = \_ -> init
, update = update
, subscriptions = always Sub.none
}