elmcodeprogramming

Elm setup and codes

SETUP

Setup for woking with Elm.

Setup


Linux

  1. Install GNU/Linux (Debian Stable or Ubuntu LTS 20.04)
  2. sudo apt-get install pkg-config build-essential docker.io git curl code -y

Visual Studio Code

  1. code --install-extension aaron-bond.better-comments
  2. code --install-extension usernamehw.errorlens
  3. code --install-extension yzhang.markdown-all-in-one
  4. code --install-extension Elmtooling.elm-ls-vscode
  5. code --install-extension joaompinto.vscode-graphviz
  6. code --install-extension EFanZh.graphviz-preview
cat > $HOME/.config/Code/User/settings.json <<EOF
{
    "editor.bracketPairColorization.enabled": true,
    "editor.guides.bracketPairs": "active",
    "editor.fontSize": 14,
    "editor.fontWeight": "bold",
    "editor.formatOnSave": true,
}
EOF

Git

  1. In github menu go to:
    1. Settings
    2. Email
    3. Enable the option: Keep my email addresses private
  2. git config --global core.editor code
  3. git config --global --edit
  4. Paste in .gitconfig file
[user]
	name = <git_username>
	email = <email_noreply>
[core]
	autocrlf = input
	editor = code

Docker

  1. sudo groupadd docker
  2. sudo usermod -aG docker $USER
  3. newgrp docker
  4. docker run hello-world

NodeJs using nvm

  1. Install nvm
  2. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
  3. export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
  4. [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
  5. nvm install 16 --> Observation: In node v.17 doesn't work crate-elm-app package
  6. nvm use 16
  7. npm install -g elm elm-test elm-format elm-test elm-format elm-review create-elm-app uglify-js

Elm

  1. elm --help
  2. create-elm-app <app_name>
  3. cd <app_name>
  4. elm-app start
  5. elm install mdgriffith/elm-ui

SSH

  1. ssh-keygen -t ed25519 -C "email"
  2. In github menu go to:
    1. Settings
    2. SSH and GPG Keys
    3. New SSH Key
    4. Paste the content of the file ~/.ssh/id_ed25519.pub
    5. git clone <repo_url>
    6. If propmt some message type yes