Skip to content

Commit 0ddfde2

Browse files
authored
Merge pull request #3 from CuriositySoftware/feature/output_console
Output results to console
2 parents 1945209 + 2e77ccf commit 0ddfde2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/Generator/Generator.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public struct Generator {
2727
let project = ProjectMaker().makeProject(from: xcodeProj)
2828

2929
console.log("🧜 Generating graph in Mermaid syntax ...")
30-
let text = MermaidFormatter().format(
30+
let mermaidMarkdown = MermaidFormatter().format(
3131
with: project,
3232
mermaidTheme: mermaidTheme,
3333
syntaxType: .init(
@@ -42,13 +42,13 @@ public struct Generator {
4242
)
4343

4444
console.log("📄 Starting to create file at \(Path(outputFilePath).absolute()) ...")
45-
if dryRun {
46-
console.log(text)
47-
} else {
48-
try FileOutputClient.live.write(text, Path(outputFilePath).url)
45+
if !dryRun {
46+
try FileOutputClient.live.write(mermaidMarkdown, Path(outputFilePath).url)
4947
}
5048

5149
console.log("✅ Created")
50+
51+
console.log(mermaidMarkdown)
5252
}
5353

5454
public init() {}

0 commit comments

Comments
 (0)