diff options
author | Joris | 2015-08-29 16:45:04 +0200 |
---|---|---|
committer | Joris | 2015-08-29 16:45:04 +0200 |
commit | 37d178041799aaf8113f6f5128334be7eb4bfd97 (patch) | |
tree | 36a55f57f807ef2dc9d5ad019fe5e2e866bb9685 | |
parent | 0599db5e42773452eeca69576ce9148d46ddf9dc (diff) |
Using npm to compile elm and haskell sources
-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" + } +} |