Skip to content

docs: update demo animation #5083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2024
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
14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,8 @@ hyperfine:
$(BINARY): FORCE
go build -o $@ ./cmd/golangci-lint

# TODO: migrate to docs/
tools/svg-term: tools/package.json tools/package-lock.json
cd tools && npm ci
ln -sf node_modules/.bin/svg-term $@

# TODO: migrate to docs/
tools/Dracula.itermcolors:
curl -fL -o $@ https://raw.githubusercontent.com/dracula/iterm/master/Dracula.itermcolors

# TODO: migrate to docs/
assets/demo.svg: tools/svg-term tools/Dracula.itermcolors
./tools/svg-term --cast=183662 --out assets/demo.svg --window --width 110 --height 30 --from 2000 --to 20000 --profile ./tools/Dracula.itermcolors --term iterm2
docs/static/demo.gif: FORCE
vhs docs/golangci-lint.tape

assets/github-action-config.json: FORCE $(BINARY)
# go run ./scripts/gen_github_action_config/main.go $@
Expand Down
86 changes: 86 additions & 0 deletions docs/golangci-lint.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
Output docs/static/demo.gif

# NOTE: it should be run at the root of the repository.
# vhs docs/golangci-lint.tape

Require golangci-lint

Set Shell zsh

Set Theme Dracula
Set FontSize 25
Set Width 2000
Set Height 900

Set WindowBar Colorful
Set WindowBarSize 50

Set Padding 20

Set MarginFill "#17afc2"
Set Margin 20

Set BorderRadius 30

Type "golangci-lint run" Sleep 500ms Enter
Sleep 2s
Sleep 1s


# VHS documentation
# https://github.com/charmbracelet/vhs
#
# Output:
# Output <path>.gif Create a GIF output at the given <path>
# Output <path>.mp4 Create an MP4 output at the given <path>
# Output <path>.webm Create a WebM output at the given <path>
#
# Require:
# Require <string> Ensure a program is on the $PATH to proceed
#
# Settings:
# Set FontSize <number> Set the font size of the terminal
# Set FontFamily <string> Set the font family of the terminal
# Set Height <number> Set the height of the terminal
# Set Width <number> Set the width of the terminal
# Set LetterSpacing <float> Set the font letter spacing (tracking)
# Set LineHeight <float> Set the font line height
# Set LoopOffset <float>% Set the starting frame offset for the GIF loop
# Set Theme <json|string> Set the theme of the terminal
# Set Padding <number> Set the padding of the terminal
# Set Framerate <number> Set the framerate of the recording
# Set PlaybackSpeed <float> Set the playback speed of the recording
# Set MarginFill <file|#000000> Set the file or color the margin will be filled with.
# Set Margin <number> Set the size of the margin. Has no effect if MarginFill isn't set.
# Set BorderRadius <number> Set terminal border radius, in pixels.
# Set WindowBar <string> Set window bar type. (one of: Rings, RingsRight, Colorful, ColorfulRight)
# Set WindowBarSize <number> Set window bar size, in pixels. Default is 40.
# Set TypingSpeed <time> Set the typing speed of the terminal. Default is 50ms.
#
# Sleep:
# Sleep <time> Sleep for a set amount of <time> in seconds
#
# Type:
# Type[@<time>] "<characters>" Type <characters> into the terminal with a
# <time> delay between each character
#
# Keys:
# Escape[@<time>] [number] Press the Escape key
# Backspace[@<time>] [number] Press the Backspace key
# Delete[@<time>] [number] Press the Delete key
# Insert[@<time>] [number] Press the Insert key
# Down[@<time>] [number] Press the Down key
# Enter[@<time>] [number] Press the Enter key
# Space[@<time>] [number] Press the Space key
# Tab[@<time>] [number] Press the Tab key
# Left[@<time>] [number] Press the Left Arrow key
# Right[@<time>] [number] Press the Right Arrow key
# Up[@<time>] [number] Press the Up Arrow key
# Down[@<time>] [number] Press the Down Arrow key
# PageUp[@<time>] [number] Press the Page Up key
# PageDown[@<time>] [number] Press the Page Down key
# Ctrl+<key> Press the Control key + <key> (e.g. Ctrl+C)
#
# Display:
# Hide Hide the subsequent commands from the output
# Show Show the subsequent commands in the output
7 changes: 1 addition & 6 deletions docs/src/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,7 @@ If you value it, consider supporting us, we appreciate it! ❤️

## Demo

![golangci-lint demo](./demo.svg)

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

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

Expand Down
Binary file added docs/static/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/static/demo.svg

This file was deleted.

Loading
Loading