made an unique compilation step
This commit is contained in:
parent
61f80f8b34
commit
1e0a546289
2 changed files with 40 additions and 0 deletions
20
README.md
20
README.md
|
@ -6,7 +6,27 @@ This is a stack project which implement this example Transient project:
|
|||
|
||||
## Usage
|
||||
|
||||
### Fastest
|
||||
|
||||
Just open a terminal and write all these commands.
|
||||
If this is the first time you use Haskell it will take a lot of time.
|
||||
Don't worry, once installed, calling `compile.sh` will be fast the next time.
|
||||
|
||||
~~~
|
||||
git clone http://github.com/yogsototh/transient-example
|
||||
cd transient-example
|
||||
./compile.sh
|
||||
./start.sh
|
||||
~~~
|
||||
|
||||
### Manually
|
||||
|
||||
1. Install [`stack`](haskellstack.org)
|
||||
|
||||
~~~
|
||||
curl -sSL https://get.haskellstack.org/ | sh
|
||||
~~~
|
||||
|
||||
2. Install ghc and ghcjs with stack.
|
||||
If you never installed ghcjs that could take a _lot_ of time.
|
||||
|
||||
|
|
20
compile.sh
Executable file
20
compile.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if command -v stack >/dev/null 2>&1
|
||||
then echo "stack already installed."
|
||||
else
|
||||
echo "stack is not installed. I will try to install it."
|
||||
curl -sSL https://get.haskellstack.org/ | sh
|
||||
fi
|
||||
|
||||
# Downloading Haskell Compiler this can be very long
|
||||
stack setup
|
||||
stack --stack-yaml stack-ghcjs.yaml setup
|
||||
|
||||
# Building the project the first time it will also download and compile
|
||||
# library
|
||||
stack build
|
||||
stack --stack-yaml stack-ghcjs.yaml build
|
||||
|
||||
# Link GHCJS result to the correct directory (static/out.jsexe)
|
||||
./mklink.sh
|
Loading…
Reference in a new issue