diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rwxr-xr-x | gen | 5 | ||||
-rw-r--r-- | package.json | 18 |
4 files changed, 21 insertions, 7 deletions
@@ -7,3 +7,4 @@ public/javascripts/client.js sessionKey deploy kimsufi.tar.gz +node_modules @@ -7,7 +7,7 @@ Share costs with a group of people. ``` cabal sandbox init cabal install --only-dependencies -cabal build elm package install -./dist/build/sharedCost/sharedCost +npm install +npm run watch ``` @@ -1,5 +0,0 @@ -#!/bin/bash -trap 'fuser -k 3000/tcp' EXIT -elm-make src/client/Main.elm --output public/javascripts/client.js \ - && cabal build \ - && ./dist/build/sharedCost/sharedCost diff --git a/package.json b/package.json new file mode 100644 index 0000000..ad80280 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "devDependencies": { + "watch": "0.16.0" + }, + "scripts": { + "watch": "npm run watch-server & npm run watch-client", + "watch-server": "watch 'npm run build-and-launch-server' src/server", + "watch-client": "watch 'npm run build-client' src/client", + + "build": "npm run build-server && npm run build-client", + "build-server": "cabal build", + "build-client": "elm make src/client/Main.elm --output public/javascripts/client.js", + + "build-and-launch-server": "npm run build-server && npm run kill-server && npm run launch-server", + "launch-server": "./dist/build/sharedCost/sharedCost &", + "kill-server": "pkill sharedCost || true" + } +} |