replace elm-go with nix elm-live package

This commit is contained in:
Azizul Karim 2025-01-31 20:07:41 +06:00
parent a8cc00feac
commit 3445273d1c
No known key found for this signature in database
GPG key ID: EC7B9BE87276BA4B
2 changed files with 3 additions and 13 deletions

View file

@ -114,18 +114,8 @@
mkShell {
inputsFrom = [ example-spa-elm-app ];
buildInputs = [
nodejs_22
];
shellHook = ''
if [ ! -d "$PWD/frontend/node_modules/elm-go" ]; then
echo "Installing elm-go..."
cd "$PWD/frontend"
${nodejs_22}/bin/npm install elm-go
cd ..
fi
export PATH="$PWD/frontend/node_modules/.bin:$PATH"
'';
elmPackages.elm-live
];
};
}
);

View file

@ -21,7 +21,7 @@ endif
serve:
ifeq ($(DEBUG),1)
elm-go src/Main.elm --port=8000 --dir=../public --start-page=index.html -- --output=../public/elm.min.js
elm-live src/Main.elm --port=8000 --dir=../public --start-page=index.html -- --output=../public/elm.min.js
else ifeq ($(RELEASE),1)
$(error Cannot use serve target with RELEASE=1)
endif