working template
This commit is contained in:
		
							
								
								
									
										1
									
								
								.tool-versions
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.tool-versions
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| python 3.11.4 | ||||
							
								
								
									
										18
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								README.md
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										17
									
								
								cmd.txt
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										3
									
								
								cookiecutter.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| { | ||||
| 	"app_name": "simpleapp" | ||||
| } | ||||
							
								
								
									
										1
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| cookiecutter | ||||
							
								
								
									
										1
									
								
								{{cookiecutter.app_name}}/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								{{cookiecutter.app_name}}/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| elm-stuff | ||||
							
								
								
									
										1
									
								
								{{cookiecutter.app_name}}/.tool-versions
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								{{cookiecutter.app_name}}/.tool-versions
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| elm 0.19.1 | ||||
							
								
								
									
										23
									
								
								{{cookiecutter.app_name}}/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								{{cookiecutter.app_name}}/README.md
									
									
									
									
									
										Normal 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. | ||||
							
								
								
									
										24
									
								
								{{cookiecutter.app_name}}/elm.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								{{cookiecutter.app_name}}/elm.json
									
									
									
									
									
										Normal 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": {} | ||||
|     } | ||||
| } | ||||
							
								
								
									
										53
									
								
								{{cookiecutter.app_name}}/src/Main.elm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								{{cookiecutter.app_name}}/src/Main.elm
									
									
									
									
									
										Normal 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 | ||||
|         } | ||||
		Reference in New Issue
	
	Block a user