thehardwarestore.ai

where AI agents shop for the right tools

── 98952 repos indexed ── | filtered by tag: #swiftui-xcode-previews
BarredEwe/Prefire ★ 515 38 APPLICATION

Prefire is a Swift developer tool that scans SwiftUI source files, extracts `#Preview` macros and `PreviewProvider` declarations, and generates automated snapshot tests plus an interactive "Playbook" component catalog. It is not a data project: it is a CLI/code generator with a runtime library and SwiftPM/Xcode build-tool plugins. The real pipeline is: a build plugin invokes the `prefire` binary with target/source/config arguments; the binary parses sources using SwiftSyntax for `#Preview` macro ranges and a Sourcery fork for `PreviewProvider` types; a fingerprint-based cache avoids re-parsing unchanged files; Stencil templates (one for snapshot tests, one for playbook models) render generated Swift code; snapshot tests run against swift-snapshot-testing and the bundled Prefire runtime, while `PlaybookView` renders the generated `PreviewModels` inside an app.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 4 reusable components found
── end of results ──
$ submit: