Skip to content

Commit

Permalink
doc: improve hero gif
Browse files Browse the repository at this point in the history
Signed-off-by: Brian McGee <[email protected]>
  • Loading branch information
brianmcgee committed May 2, 2024
1 parent 2f557e3 commit 17f354b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 16 deletions.
Binary file modified docs/public/fmt.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 12 additions & 8 deletions docs/vhs/fmt.tape
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
Require nix
Require treefmt

Set Shell zsh
Set FontSize 14
Set FontSize 11

Set Theme "Catppuccin Mocha"

Set Width 720
Set Height 400
Set Width 320
Set Height 220
Set Padding 20

Type "nix fmt -- -v -c"
Type "treefmt -c"
Sleep 1s
Enter

Sleep 3s

Enter
Type "nix fmt -- -v"
Enter
Sleep 1s

Type "treefmt"
Enter

Sleep 3s
Sleep 5s
26 changes: 18 additions & 8 deletions nix/docs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,24 @@ _: {
{
category = "docs";
help = "regenerate gifs for docs";
name = "gifs";
command = ''
set -xeuo pipefail
for tape in $PRJ_ROOT/docs/vhs/*; do
vhs $tape -o "$PRJ_ROOT/docs/public/$(basename $tape .tape).gif"
done
'';
package = let
treefmt = pkgs.writeShellApplication {
name = "treefmt";
runtimeInputs = [self'.packages.treefmt] ++ (import ./formatters.nix pkgs);
text = ''
treefmt -C "$PRJ_ROOT/test/examples" --allow-missing-formatter "$@"
'';
};
in
pkgs.writeShellApplication {
name = "gifs";
runtimeInputs = [treefmt];
text = ''
for tape in "$PRJ_ROOT"/docs/vhs/*; do
vhs "$tape" -o "$PRJ_ROOT/docs/public/$(basename "$tape" .tape).gif"
done
'';
};
}
];
};
Expand Down

0 comments on commit 17f354b

Please sign in to comment.