Skip to content

Commit

Permalink
docs: Add wxt init demo GIF (#974)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron <[email protected]>
Co-authored-by: okineadev <[email protected]>
  • Loading branch information
3 people authored Sep 14, 2024
1 parent e760ee4 commit 786292c
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Basic Setup
description: Install PNPM, Node, and dependencies
inputs:
install:
default: 'true'
description: Whether or not to run 'pnpm install'
runs:
using: composite
steps:
Expand All @@ -11,5 +15,6 @@ runs:
node-version: 18
cache: pnpm
- name: Install Dependencies
if: ${{ inputs.install == 'true' }}
shell: bash
run: pnpm install
29 changes: 29 additions & 0 deletions .github/workflows/vhs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: vhs
on:
push:
paths:
- 'docs/tapes/*.tape'
workflow_dispatch:

jobs:
vhs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
install: 'false'
- name: Preinstall WXT
run: |
pnpm store add wxt@latest
pnpm dlx wxt@latest --version
- uses: charmbracelet/[email protected]
with:
path: 'docs/tapes/init-demo.tape'
- uses: stefanzweifel/git-auto-commit-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: 'docs: Update `wxt init` GIF'
# https://github.com/charmbracelet/vhs#output
file_pattern: 'docs/assets/*.gif'
Binary file added docs/assets/init-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/get-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ npx wxt@latest init <project-name>
npx wxt@latest init <project-name>
```

### Demo

![wxt init demo](/assets/init-demo.gif)

:::

There are several starting templates available.
Expand Down
59 changes: 59 additions & 0 deletions docs/tapes/init-demo.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# VHS documentation
#
# You can view all VHS documentation on the command line with `vhs manual`.
# Or see https://github.com/charmbracelet/vhs#vhs-command-reference

# Output file
Output docs/assets/init-demo.gif

# The tools we will use
Require pnpm


# === Scene ====
Set Width 1400
Set Height 800

# The maximum FPS for GIF is `50` FPS.
Set Framerate 50

# Terminal theme with WXT brand colors (which was taken from the website)
# Based on the standard charmbracelet/vhs theme:
# https://github.com/charmbracelet/vhs/blob/88e634f4a10bbe305b6aea9a12b4d8dc3dd7f31c/style.go#L7-L28
Set Theme {"background": "#1a1b1a", "foreground": "#dddddd", "black": "#282a2e", "brightBlack": "#4d4d4d", "red": "#D74E6F", "brightRed": "#FE5F86", "green": "#67d45e", "brightGreen": "#67d45e", "yellow": "#D3E561", "brightYellow": "#EBFF71", "blue": "#8056FF", "brightBlue": "#9B79FF", "magenta": "#ED61D7", "brightMagenta": "#FF7AEA", "cyan": "#04D7D7", "brightCyan": "#00FEFE", "white": "#bfbfbf", "brightWhite": "#e6e6e6", "indigo": "#5B56E0"}
Set FontSize 32

# Terminal settings
Set Shell "bash"

# Terminal prompt. It looks like "● mycommand ..."
Env PS1 "\e[0;32m●\e[0m "


# ===== Preparation =====
# Steps to prepare the recording environment, ensuring a clean and isolated setup.

Hide
# Create a temporary folder for demo
Type 'vhs_sandbox="$(mktemp -d)"' Enter
Type 'cd "$vhs_sandbox"' Enter
Type 'clear' Enter
Show


# ===== Actions =====

Type 'pnpm dlx wxt@latest init .' Sleep 1s Enter
Sleep 3.25s
Down@750ms Enter@750ms # Select `vue` template
Sleep 1.25s
Down@750ms Enter@750ms # Select `pnpm` as a package manager
Sleep 5s


# ===== Cleaning =====

Hide
# Delete the temporary folder
Type 'rm -rf "$vhs_sandbox"' Enter
Show

0 comments on commit 786292c

Please sign in to comment.