Skip to content

Commit

Permalink
Update release docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Sep 8, 2024
1 parent a39ae12 commit 6d00387
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion PwshSpectreConsole.Docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default defineConfig({
},
{
label: "Upgrading to v2",
link: "/guides/upgrading-to-2-0/",
link: "/guides/upgrading-to-v2/",
badge: {
text: "New",
variant: "tip",
Expand Down
Binary file added PwshSpectreConsole.Docs/public/filebrowser.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ description: Breaking and important changes.

## 🚀 Check out the Prerelease Build

Install or update to the pre-release version of the module.
Install or update to the latest version of the module.

```powershell
Install-Module PwshSpectreConsole -Scope CurrentUser -AllowPrerelease
# or update to the prerelease version
Update-Module PwshSpectreConsole -Scope CurrentUser -AllowPrerelease
# Install the latest version
Install-Module PwshSpectreConsole -Scope CurrentUser
# or update your existing version to the latest
Update-Module PwshSpectreConsole -Scope CurrentUser
```

## 💥 Breaking Changes
Expand Down Expand Up @@ -50,7 +51,15 @@ $fruits = @(
} | Format-SpectreTable -Color Cyan1
```

### New Commandlets
### Live Rendering

The `Invoke-SpectreLive` function allows you to run a scriptblock and update a renderable item live in real-time. This allow you to build simple terminal user interfaces or live updating dashboards.

See the documentation for [`Invoke-SpectreLive`](/reference/live/invoke-spectrelive/) for more information and examples.

![Filebrowser example](../../../../public/filebrowser.gif)

### All New Commandlets

New commandlets to make this PowerShell library compatible with the rest of the Spectre.Console C# library:

Expand Down
2 changes: 1 addition & 1 deletion PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ foreach ($doc in $docs) {
Set-Location "$PSScriptRoot/../../../PwshSpectreConsole"
Push-Location -StackName "ExampleInvoke"
Invoke-Expression $code
Set-SpectreColors -AccentColor "Turquoise2"
Set-SpectreColors -AccentColor "Blue"
Pop-Location -StackName "ExampleInvoke"
$recording = Stop-SpectreRecording -Title "Example $([int]$example++)"

Expand Down
4 changes: 2 additions & 2 deletions PwshSpectreConsole/public/formatting/Format-SpectreRows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function Format-SpectreRows {
if ($dataItem -is [Spectre.Console.Rendering.Renderable]) {
$rowItems += $dataItem
} elseif ($dataItem -is [string]) {
$rowItems += [Spectre.Console.Text]::new($dataItem)
$rowItems += $dataItem | ConvertTo-Renderable
} else {
throw "Data item must be a spectre renderable object or string"
}
Expand All @@ -51,7 +51,7 @@ function Format-SpectreRows {
if ($Data -is [Spectre.Console.Rendering.Renderable]) {
$rowItems += $Data
} elseif ($Data -is [string]) {
$rowItems += [Spectre.Console.Text]::new($Data)
$rowItems += $Data | ConvertTo-Renderable
} else {
throw "Data item must be a spectre renderable object or string"
}
Expand Down

0 comments on commit 6d00387

Please sign in to comment.