Skip to content

Commit d998fc2

Browse files
authored
docs: update demo animation (#5083)
1 parent baf610d commit d998fc2

File tree

7 files changed

+89
-1568
lines changed

7 files changed

+89
-1568
lines changed

Makefile

+2-12
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,8 @@ hyperfine:
8585
$(BINARY): FORCE
8686
go build -o $@ ./cmd/golangci-lint
8787

88-
# TODO: migrate to docs/
89-
tools/svg-term: tools/package.json tools/package-lock.json
90-
cd tools && npm ci
91-
ln -sf node_modules/.bin/svg-term $@
92-
93-
# TODO: migrate to docs/
94-
tools/Dracula.itermcolors:
95-
curl -fL -o $@ https://raw.githubusercontent.com/dracula/iterm/master/Dracula.itermcolors
96-
97-
# TODO: migrate to docs/
98-
assets/demo.svg: tools/svg-term tools/Dracula.itermcolors
99-
./tools/svg-term --cast=183662 --out assets/demo.svg --window --width 110 --height 30 --from 2000 --to 20000 --profile ./tools/Dracula.itermcolors --term iterm2
88+
docs/static/demo.gif: FORCE
89+
vhs docs/golangci-lint.tape
10090

10191
assets/github-action-config.json: FORCE $(BINARY)
10292
# go run ./scripts/gen_github_action_config/main.go $@

docs/golangci-lint.tape

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
Output docs/static/demo.gif
2+
3+
# NOTE: it should be run at the root of the repository.
4+
# vhs docs/golangci-lint.tape
5+
6+
Require golangci-lint
7+
8+
Set Shell zsh
9+
10+
Set Theme Dracula
11+
Set FontSize 25
12+
Set Width 2000
13+
Set Height 900
14+
15+
Set WindowBar Colorful
16+
Set WindowBarSize 50
17+
18+
Set Padding 20
19+
20+
Set MarginFill "#17afc2"
21+
Set Margin 20
22+
23+
Set BorderRadius 30
24+
25+
Type "golangci-lint run" Sleep 500ms Enter
26+
Sleep 2s
27+
Sleep 1s
28+
29+
30+
# VHS documentation
31+
# https://github.com/charmbracelet/vhs
32+
#
33+
# Output:
34+
# Output <path>.gif Create a GIF output at the given <path>
35+
# Output <path>.mp4 Create an MP4 output at the given <path>
36+
# Output <path>.webm Create a WebM output at the given <path>
37+
#
38+
# Require:
39+
# Require <string> Ensure a program is on the $PATH to proceed
40+
#
41+
# Settings:
42+
# Set FontSize <number> Set the font size of the terminal
43+
# Set FontFamily <string> Set the font family of the terminal
44+
# Set Height <number> Set the height of the terminal
45+
# Set Width <number> Set the width of the terminal
46+
# Set LetterSpacing <float> Set the font letter spacing (tracking)
47+
# Set LineHeight <float> Set the font line height
48+
# Set LoopOffset <float>% Set the starting frame offset for the GIF loop
49+
# Set Theme <json|string> Set the theme of the terminal
50+
# Set Padding <number> Set the padding of the terminal
51+
# Set Framerate <number> Set the framerate of the recording
52+
# Set PlaybackSpeed <float> Set the playback speed of the recording
53+
# Set MarginFill <file|#000000> Set the file or color the margin will be filled with.
54+
# Set Margin <number> Set the size of the margin. Has no effect if MarginFill isn't set.
55+
# Set BorderRadius <number> Set terminal border radius, in pixels.
56+
# Set WindowBar <string> Set window bar type. (one of: Rings, RingsRight, Colorful, ColorfulRight)
57+
# Set WindowBarSize <number> Set window bar size, in pixels. Default is 40.
58+
# Set TypingSpeed <time> Set the typing speed of the terminal. Default is 50ms.
59+
#
60+
# Sleep:
61+
# Sleep <time> Sleep for a set amount of <time> in seconds
62+
#
63+
# Type:
64+
# Type[@<time>] "<characters>" Type <characters> into the terminal with a
65+
# <time> delay between each character
66+
#
67+
# Keys:
68+
# Escape[@<time>] [number] Press the Escape key
69+
# Backspace[@<time>] [number] Press the Backspace key
70+
# Delete[@<time>] [number] Press the Delete key
71+
# Insert[@<time>] [number] Press the Insert key
72+
# Down[@<time>] [number] Press the Down key
73+
# Enter[@<time>] [number] Press the Enter key
74+
# Space[@<time>] [number] Press the Space key
75+
# Tab[@<time>] [number] Press the Tab key
76+
# Left[@<time>] [number] Press the Left Arrow key
77+
# Right[@<time>] [number] Press the Right Arrow key
78+
# Up[@<time>] [number] Press the Up Arrow key
79+
# Down[@<time>] [number] Press the Down Arrow key
80+
# PageUp[@<time>] [number] Press the Page Up key
81+
# PageDown[@<time>] [number] Press the Page Down key
82+
# Ctrl+<key> Press the Control key + <key> (e.g. Ctrl+C)
83+
#
84+
# Display:
85+
# Hide Hide the subsequent commands from the output
86+
# Show Show the subsequent commands in the output

docs/src/docs/index.mdx

+1-6
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,7 @@ If you value it, consider supporting us, we appreciate it! ❤️
4646

4747
## Demo
4848

49-
![golangci-lint demo](./demo.svg)
50-
51-
<!--
52-
Short 1.5 min video demo of analyzing [beego](https://github.com/astaxie/beego).
53-
[![asciicast](https://asciinema.org/a/183662.svg)](https://asciinema.org/a/183662)
54-
-->
49+
![golangci-lint demo](./demo.gif)
5550

5651
[Get started now!](/welcome/install)
5752

docs/static/demo.gif

177 KB
Loading

docs/static/demo.svg

-1
This file was deleted.

0 commit comments

Comments
 (0)