Skip to content

Commit 6258c14

Browse files
committed
Add build scripts for simplicity
1 parent 5de4296 commit 6258c14

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ cabal.project.local
2525
*.js_hi
2626

2727
node_modules/
28+
29+
server/static

build.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash -e
2+
3+
CLIENT_STACK_OPTION="--stack-yaml=client/stack.yaml"
4+
SERVER_STACK_OPTION="--stack-yaml=server/stack.yaml"
5+
6+
CLIENT_INSTALL_ROOT=$(stack path --local-install-root ${CLIENT_STACK_OPTION})
7+
SERVER_INSTALL_ROOT=$(stack path --local-install-root ${SERVER_STACK_OPTION})
8+
9+
SERVER_STATIC_DIR=server/static
10+
11+
stack build ${CLIENT_STACK_OPTION}
12+
13+
mkdir -p ${SERVER_STATIC_DIR}
14+
cp ${CLIENT_INSTALL_ROOT}/bin/miso-tutorial-app-client.jsexe/all.js \
15+
${SERVER_STATIC_DIR}/all.js
16+
17+
stack build ${SERVER_STACK_OPTION}
18+
cd server && ${SERVER_INSTALL_ROOT}/bin/miso-tutorial-app-server

0 commit comments

Comments
 (0)