working template
This commit is contained in:
commit
6a6d612acb
|
@ -0,0 +1 @@
|
|||
python 3.11.4
|
|
@ -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
|
|
@ -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
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"app_name": "simpleapp"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
cookiecutter
|
|
@ -0,0 +1 @@
|
|||
elm-stuff
|
|
@ -0,0 +1 @@
|
|||
elm 0.19.1
|
|
@ -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.
|
|
@ -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": {}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue