PowerShell module that builds HTML reports, dashboards and emails (tables, charts, diagrams, calendars, tabs, navigation) without writing HTML, CSS or JavaScript. Runs on Windows PowerShell 5.1 and PowerShell 7 on Windows, Linux and macOS.
Public/: exported functions, one function per file.Private/: internal helpers.Private/Parameters.Configuration.ps1(Get-DefaultParameters) registers every CSS/JS feature and its sources.Resources/CSS,Resources/JS,Resources/Images,Resources/Maps: the bundled third-party and own assets embedded into offline reports.Tests/: Pester tests, run throughPSWriteHTML.Tests.ps1at the root.Tests/Browser/: headless Edge navigation checks (see Gotchas).Examples/: runnable examples. Output underExamples/Output,Examples/Reportsand*.htmlis ignored.Build/Build-Module.ps1: build, docs and release through PSPublishModule.Build/Export-WebsiteArtifacts.ps1andWebsite/content/: curated content for the project's website page (seeWebsite/README.md).Docs/: generated command help.
./PSWriteHTML.Tests.ps1 # Pester suite (installs Pester, PSWriteColor, PSParseHTML if missing)
./Build/Build-Module.ps1 # build into Artefacts/ and regenerate Docs/
./Build/Build-Module.ps1 -ConfigurationGateMode Manifest # manifest-only gate
./Build/Export-WebsiteArtifacts.ps1 # website API artifacts into WebsiteArtifacts/ (ignored)-ConfigurationGateMode Publish signs the module and is release-only.
CI (.github/workflows/ci.yml) runs the suite on Windows PowerShell 5.1 and on
PowerShell 7 on Windows, Ubuntu and macOS.
Docs/*.mdanden-US/PSWriteHTML-help.xml(ignored) come from the comment-based help inPublic/. Edit the help in the function and rebuild. Don't editDocs/by hand.PSWriteHTML.psd1is refreshed by the build. The build also merges approved helper functions from PSSharedGoods into the released module.Artefacts/andWebsiteArtifacts/are build output and ignored.
- Keep Windows PowerShell 5.1 compatibility. No PowerShell 7-only syntax.
- K&R/OTBS braces, 4-space indentation, full parameter names. Comment-based
help sits inside the function, before
[CmdletBinding()]. - A feature in
Get-DefaultParametershas both a local file underResources/(embedded by default) and a CDN link (used withNew-HTML -Online). When you update a library, update both and keep the versions matching. - PSParseHTML and Mailozaurr are optional. Check for them at runtime, don't add them as required modules.
- Commit and PR titles use Conventional Commits with Gitmoji:
fix(tabs): 🐛 honor first-tab hash navigation.
Tests/Browser/*.ps1are not part of the Pester run. They need a loopback HTTP server serving the generated reports and PSParseHTML's headless Edge:./Tests/Browser/Invoke-TopNavigationTest.ps1 -ReportDirectory <dir> -BaseUri http://127.0.0.1:<port>/.Emailcan send real mail (SMTP or the optional Mailozaurr). Tests mock sending. Don't send mail unless the task asks for it.