Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit 460e6a5

Browse files
authored
Merge pull request #25 from objectionary/add-flakes
Add flakes
2 parents efee4cc + 18cf245 commit 460e6a5

32 files changed

+1319
-381
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
.psc*
2+
.direnv
3+
result

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"haskell.serverExecutablePath": "haskell-language-server-wrapper"
3+
}

.vscode/try-phi.code-workspace

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"folders": [
3+
{
4+
"path": ".."
5+
},
6+
{
7+
"path": "../back"
8+
},
9+
{
10+
"path": "../front"
11+
}
12+
],
13+
"settings": {}
14+
}

README.md

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,40 @@ It is combined with [EO](https://github.com/objectionary/eo) editor. EO is based
2323

2424
## Development
2525

26-
- Install dependencies
27-
28-
- [Back end](./back/README.md#dependencies)
29-
- [Front end](./front/README.md#dependencies)
30-
31-
- Build the server and front end
32-
26+
- Install [Nix](https://nixos.org/download.html) (Single-user installation)
3327
```sh
34-
sh build.sh
28+
sh <(curl -L https://nixos.org/nix/install) --no-daemon
3529
```
3630

37-
- Run the server and front end in separate terminals to see separate logs:
31+
- Install [direnv](https://nix.dev/tutorials/declarative-and-reproducible-developer-environments#direnv-automatically-activating-the-environment-on-directory-change) - steps 1, 2
3832

33+
- For [VS Code](https://code.visualstudio.com/)
34+
- Install extensions
3935
```sh
40-
sh run_back.sh
41-
sh run_front.sh
42-
```
36+
code --install-extension mkhl.direnv --install-extension haskell.haskell --install-extension nwolverson.ide-purescript
37+
```
38+
- Open workspace in `.vscode/try-phi.code-workspace`
39+
40+
- In separate terminals:
41+
- backend dev
42+
```sh
43+
cd back
44+
# for the first time
45+
direnv allow
46+
# start the server
47+
nix run
48+
```
49+
- front
50+
```sh
51+
cd front
52+
# for the first time
53+
direnv allow
54+
# open app in a browser
55+
npm run dev
56+
# or any other commands from package.json
57+
```
58+
59+
- If in VS Code, reload the window (`Ctrl`+`Shift`+`P` -> `Developer: Reload window`) and repeat previous commands to start the server and the client
60+
61+
- For Haskell, your shell will have [haskell-language-server](https://github.com/haskell/haskell-language-server)
62+
- For Purescript - [purescript-language-server](https://github.com/nwolverson/purescript-language-server)

back/.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

back/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
.stack-work
1+
.stack-work
2+
dist-newstyle
3+
result

0 commit comments

Comments
 (0)