aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCan2024-12-19 12:49:45 +0100
committerCan2024-12-19 12:49:45 +0100
commit637f07a69c6f3f047df12069e63fd98516a1f46d (patch)
treeef51c5ce1708fce6281a3c1fdd4e0224db7033af
parentf272fb42ee9af72cda2713fb3101a5cd39b1337c (diff)
refactor: formatting
-rw-r--r--README.md19
1 files changed, 17 insertions, 2 deletions
diff --git a/README.md b/README.md
index c5a52f2..ff6d362 100644
--- a/README.md
+++ b/README.md
@@ -22,50 +22,60 @@ This template provides a starting point for Effekt projects.
After using this template, follow these steps to set up your project:
1. Set up your development environment:
+
- Clone this repository locally.
- Open it in VSCode.
- Install the Effekt VSCode extension offered in the pop-up in the bottom right.
2. Customize the project:
+
- Open `flake.nix` and update the project name and other relevant values (follow the comments).
- Push your `flake.nix` file after the changes and see if the CI agrees.
3. Set-up auto-update CI in order to get weekly PRs on Tuesday which update the Effekt version in CI:
+
- Go to Settings -> Actions -> General:
- and set "Workflow permissions" to "Read and write permissions"
- - and check "Allow GitHub Actions to create and approve pull requests"
+ - and check "Allow GitHub Actions to create and approve pull requests"
- See the [CI](#ci) section for more details
-3. Replace this `README` with your own!
+4. Replace this `README` with your own!
## Useful commands
### Effekt commands
Run the main file:
+
```sh
effekt src/main.effekt
```
+
This (like many other Effekt commands) uses the JavaScript backend by default.
To use a different backend, add the `--backend <backend>` flag.
Run the tests:
+
```sh
effekt src/test.effekt
```
Open the REPL:
+
```sh
effekt
```
Build the project:
+
```sh
effekt --build src/main.effekt
```
+
This builds the project into the `out/` directory, creating a runnable file `out/main`.
To see all available options and backends, run:
+
```sh
effekt --help
```
@@ -75,21 +85,25 @@ effekt --help
While Nix installation is optional, it provides several benefits:
Update dependencies (also runs automatically in CI):
+
```sh
nix flake update
```
Open a shell with all necessary dependencies:
+
```sh
nix develop
```
Run the main entry point:
+
```sh
nix run
```
Build the project (output in `result/bin/`):
+
```sh
nix build
```
@@ -116,6 +130,7 @@ nix build
Two GitHub Actions are set up:
1. `flake-check`:
+
- Checks the `flake.nix` file, builds and tests the project
- Runs on demand, on `main`, and on PRs
- To run custom commands, add a step using: