55 lines
1.0 KiB
YAML
55 lines
1.0 KiB
YAML
id: "elm"
|
|
name: "Elm"
|
|
|
|
install:
|
|
npm:
|
|
- "@kachkaev/run-elm"
|
|
- "@elm-tooling/elm-language-server"
|
|
manual: |
|
|
install -d "${pkg}/opt/elm"
|
|
install -d "${pkg}/usr/local/bin"
|
|
|
|
ver="$(latest_release elm/compiler)"
|
|
wget "https://github.com/elm/compiler/releases/download/${ver}/binary-for-linux-64-bit.gz"
|
|
gunzip binary-for-linux-64-bit.gz
|
|
chmod +x binary-for-linux-64-bit
|
|
cp binary-for-linux-64-bit "${pkg}/usr/local/bin/elm"
|
|
|
|
mkdir elm-project
|
|
pushd elm-project
|
|
(yes || true) | "${pkg}/usr/local/bin/elm" init
|
|
cat elm.json | jq '."source-directories" = ["."]' > "${pkg}/opt/elm/elm".json
|
|
popd
|
|
|
|
repl: |
|
|
elm repl
|
|
|
|
main: "Main.elm"
|
|
template: |
|
|
module Main exposing (..)
|
|
|
|
output : String
|
|
output = "Hello, world!"
|
|
|
|
run: |
|
|
cp /opt/elm/elm.json elm.json || exit
|
|
|
|
run-elm Main.elm
|
|
elm repl
|
|
|
|
scope:
|
|
code: |
|
|
x = 123 * 234
|
|
input: |
|
|
import Main
|
|
Main.x
|
|
|
|
lsp:
|
|
setup: |
|
|
cp /opt/elm/elm.json elm.json
|
|
start: |
|
|
elm-language-server --stdio
|
|
|
|
skip:
|
|
- lsp
|