Skip to content

Commit 8e56b22

Browse files
authored
Update README.md
1 parent dc151d9 commit 8e56b22

File tree

1 file changed

+42
-6
lines changed

1 file changed

+42
-6
lines changed

README.md

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<p align="center">
66
<a href="https://github.com/BarredEwe/Prefire/releases/latest"><img alt="Release" src="https://img.shields.io/github/release/BarredEwe/Prefire.svg"/></a>
77
<a href="https://developer.apple.com/"><img alt="Platform" src="https://img.shields.io/badge/platform-iOS-green.svg"/></a>
8-
<a href="https://developer.apple.com/swift"><img alt="Swift5" src="https://img.shields.io/badge/language-Swift_6-green.svg"/></a>
8+
<a href="https://developer.apple.com/swift"><img alt="Swift6" src="https://img.shields.io/badge/language-Swift_6-green.svg"/></a>
99
<a href="https://swift.org/package-manager"><img alt="Swift Package Manager" src="https://img.shields.io/badge/SwiftPM-compatible-yellowgreen.svg"/></a>
1010
<img alt="Swift Package Manager" src="https://img.shields.io/badge/Xcode%20Plugins-Supported-brightgreen.svg"/>
1111
</p>
@@ -31,9 +31,10 @@ You can try 🔥**Prefire** starting from example project.
3131

3232
## Installation
3333

34-
**Prefire** can be installed for an `Xcode Project` or only for one `Package`.
34+
**Prefire** can be installed for an `Xcode Project` or only for one `Package` or `CLI` tool.
3535

36-
### **Xcode Project Plugin**
36+
<details>
37+
<summary><h3 style="display:inline-block">Xcode Project Plugin</h3></summary>
3738

3839
You can integrate Prefire as an Xcode Build Tool Plug-in if you're working
3940
on a project in Xcode.
@@ -47,10 +48,11 @@ Open `Run Build Tool Plug-ins` and select the `+` button.
4748
From the list, select `PrefirePlaybookPlugin` or `PrefireTestsPlugin`, and add it to the project.
4849

4950
<img src="https://i.postimg.cc/VNnJNrX3/Screenshot-2023-01-19-at-16-43-44.png" width="400">
51+
</details>
52+
<details>
53+
<summary><h3 style="display:inline-block">Swift Package Plugin</h3></summary>
5054

51-
### **Swift Package Plugin**
52-
53-
You can integrate **Prefire** as a Swift Package Manager Plug-in if you're working with
55+
You can integrate Prefire as a Swift Package Manager Plug-in if you're working with
5456
a Swift Package with a `Package.swift` manifest.
5557

5658
1. Add **Prefire** as a package dependency to your `Package.swift` file.
@@ -77,6 +79,40 @@ dependencies: [
7779
]
7880
)
7981
```
82+
</details>
83+
<details>
84+
<summary><h3 style="display:inline-block">Command line tool (CLI)</h3></summary>
85+
86+
Prefire provides a command-line interface for generating snapshot tests from your previews.
87+
88+
### Installation
89+
Download Pre-built Binary
90+
```bash
91+
curl -L https://github.com/BarredEwe/Prefire/raw/refs/heads/main/Binaries/PrefireBinary.artifactbundle/prefire-3.6.0-macos/bin/prefire -o prefire
92+
```
93+
Make executable and move to bin
94+
```bash
95+
chmod +x prefire;
96+
sudo mv prefire /usr/local/bin/
97+
```
98+
99+
### Basic Commands
100+
#### Generate Tests
101+
Generate snapshot tests from your preview providers:
102+
```bash
103+
prefire tests
104+
```
105+
> Tip: Use `prefire tests --help` for complete documentation
106+
107+
#### Generate Playbook
108+
Generate a playbook file documenting all your previews:
109+
110+
```bash
111+
prefire playbook
112+
```
113+
> Tip: Use `prefire playbook --help` for complete documentation
114+
115+
</details>
80116

81117
---
82118

0 commit comments

Comments
 (0)