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

Commit f9bac0a

Browse files
committed
add use direnv
1 parent 8d59a50 commit f9bac0a

File tree

13 files changed

+59
-48
lines changed

13 files changed

+59
-48
lines changed

.envrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.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: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,36 @@ 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/), install extensions
3934
```sh
40-
sh run_back.sh
41-
sh run_front.sh
42-
```
35+
code --install-extension mkhl.direnv --install-extension haskell.haskell --install-extension nwolverson.ide-purescript
36+
```
37+
38+
- In separate terminals:
39+
- backend dev
40+
```sh
41+
cd back
42+
# for the first time
43+
direnv allow
44+
# start the server
45+
nix run
46+
```
47+
- front
48+
```sh
49+
cd front
50+
# for the first time
51+
direnv allow
52+
# open app in a browser
53+
npm run dev
54+
# or any other commands from package.json
55+
```
56+
57+
- For Haskell, your shell will have [haskell-language-server](https://github.com/haskell/haskell-language-server)
58+
- 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

flake.nix

Lines changed: 0 additions & 24 deletions
This file was deleted.

front/.envrc

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

front/.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
.*
2-
!.gitignore
3-
!.github
1+
.parcel-cache
2+
.spago
3+
4+
.gitignore
5+
.github
46

57
output
68
generated-docs

front/flake.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
]) ++ (with easy-ps; [
3131
purs
3232
spago
33+
purescript-language-server
34+
purs-tidy
35+
psa
3336
]);
34-
};
37+
} // {shellHooks = "spago build";};
3538
});
3639
}

front/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)