diff --git a/.prettierrc b/.prettierrc index d87faa5..0967ef4 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,11 +1 @@ -{ - "plugins": ["prettier-plugin-astro"], - "overrides": [ - { - "files": "*.astro", - "options": { - "parser": "astro" - } - } - ] -} +{} diff --git a/website/.github/workflows/playwright.yml b/website/.github/workflows/playwright.yml index 3eb1314..2812391 100644 --- a/website/.github/workflows/playwright.yml +++ b/website/.github/workflows/playwright.yml @@ -1,27 +1,27 @@ name: Playwright Tests on: push: - branches: [ main, master ] + branches: [main, master] pull_request: - branches: [ main, master ] + branches: [main, master] jobs: test: timeout-minutes: 60 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies + run: npm ci + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run Playwright tests + run: npx playwright test + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/website/.prettierrc b/website/.prettierrc new file mode 100644 index 0000000..d87faa5 --- /dev/null +++ b/website/.prettierrc @@ -0,0 +1,11 @@ +{ + "plugins": ["prettier-plugin-astro"], + "overrides": [ + { + "files": "*.astro", + "options": { + "parser": "astro" + } + } + ] +} diff --git a/website/src/content/commands.md b/website/src/content/commands.md new file mode 100644 index 0000000..cc1906b --- /dev/null +++ b/website/src/content/commands.md @@ -0,0 +1,8 @@ +| Command | Description | +| ------------- | ---------------------------------------------------------------- | +| `hdi` | Interactive picker — shows all sections (default) | +| `hdi install` | Just install/setup commands (aliases: `setup`, `i`) | +| `hdi run` | Just run/start commands (aliases: `start`, `r`) | +| `hdi test` | Just test commands (alias: `t`) | +| `hdi deploy` | Just deploy/release commands and platform detection (alias: `d`) | +| `hdi all` | All sections (aliases: `a`) | diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro index 034af07..e365df7 100644 --- a/website/src/pages/index.astro +++ b/website/src/pages/index.astro @@ -5,6 +5,7 @@ import DemoLatte from "../assets/demo-latte.gif"; import DemoMocha from "../assets/demo-mocha.gif"; import { VERSION } from "../data/data"; import HdiLogo from "../components/HdiLogo.astro"; +import { Content as CommandTable } from "../content/commands.md"; --- @@ -29,7 +30,9 @@ import HdiLogo from "../components/HdiLogo.astro"; > + fill="currentColor" + > + {VERSION} @@ -48,9 +51,7 @@ import HdiLogo from "../components/HdiLogo.astro";

Install

-

- Works on macOS and Linux (probably WSL2 also). -

+

Works on macOS and Linux (probably WSL2 also).

@@ -76,39 +77,32 @@ import HdiLogo from "../components/HdiLogo.astro"; etc. It extracts the fenced code blocks from matching sections and presents them as an interactive, executable list.

-
- -
-

Usage

-
$ cd some-project
-$ hdi
-[hdi] some-project
-
-  Installation
-  ▶ npm install
-    cp .env.example .env
-
-  Run
-    npm run dev
-
-  ↑↓ navigate  ⇥ sections  ⏎ execute  c copy  q quit
-