Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

export DIRENV_WARN_TIMEOUT=20s

eval "$(devenv direnvrc)"

use devenv
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Devenv
.devenv*
devenv.local.nix
devenv.local.yaml

# direnv
.direnv

# pre-commit
.pre-commit-config.yaml
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ pnpm install
pnpm dev
```

or with `devenv`

```shell
devenv up
```

Then open the URL printed in the terminal (usually `http://localhost:5173`).

Make modifications to any of the schema yaml files, and the page will rebuild and reload automatically.
Expand All @@ -23,6 +29,12 @@ pnpm lint
pnpm scalar-lint
```

or with `devenv`

```bash
devenv tasks run api:check
```

### Format the yaml files

```shell
Expand Down
65 changes: 65 additions & 0 deletions devenv.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1773867720,
"narHash": "sha256-Z1SAMRSzrHiAlUnH/2IuN475vyWREWV8nDOeqb8GxhM=",
"owner": "cachix",
"repo": "devenv",
"rev": "b97092200826a16ca0794df670d2dd6b5427c060",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"nixpkgs": {
"inputs": {
"nixpkgs-src": "nixpkgs-src"
},
"locked": {
"lastModified": 1773704619,
"narHash": "sha256-LKtmit8Sr81z8+N2vpIaN/fyiQJ8f7XJ6tMSKyDVQ9s=",
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "906534d75b0e2fe74a719559dfb1ad3563485f43",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"type": "github"
}
},
"nixpkgs-src": {
"flake": false,
"locked": {
"lastModified": 1773597492,
"narHash": "sha256-hQ284SkIeNaeyud+LS0WVLX+WL2rxcVZLFEaK0e03zg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a07d4ce6bee67d7c838a8a5796e75dff9caa21ef",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
39 changes: 39 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{ pkgs, lib, config, inputs, ... }:

{
packages = [ pkgs.git ];

languages = {
javascript = {
enable = true;
package = pkgs.nodejs_24;
npm.enable = true;
pnpm = {
enable = true;
};
corepack.enable = true;
};
};

processes.serve = {
exec = "pnpm run dev";
cwd = "doc";
};

enterShell = ''
cd $DEVENV_ROOT/doc
pnpm install
'';

tasks = {
"api:check" = {
exec = ''
pnpm run spectral
pnpm run lint
pnpm run scalar-lint
pnpm run check-format
'';
cwd = "doc";
};
};
}
3 changes: 3 additions & 0 deletions devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
inputs:
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling
Loading