Skip to content

Commit f8bb134

Browse files
committed
refactor: Extract terminal output to separate constant
Move inline terminal output template literal to a reusable terminalOutput constant for better code organization.
1 parent ef67bcb commit f8bb134

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

src/pages/examples/basic-pipeline/index.mdx

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ layout: "@layouts/ExampleLayout.astro"
66
import { Code } from "astro-expressive-code/components";
77
import pipelineCode from "./_main.nf?raw";
88

9+
const terminalOutput = `nextflow run main.nf
10+
11+
N E X T F L O W ~ version 24.10.0
12+
Launching \`main.nf\` [peaceful-jepsen] DSL2 - revision: a9012339ce
13+
14+
executor > local (3)
15+
[ba/2ef6e7] process > splitSequences [100%] 1 of 1 ✓
16+
[37/1ef9a2] process > reverse (2) [100%] 2 of 2 ✓
17+
18+
sey lacol edoN
19+
tset a si sihT
20+
21+
Completed at: 16-Nov-2024 15:42:33
22+
Duration : 1.2s
23+
CPU hours : (a few seconds)
24+
Succeeded : 3`;
25+
926
<h2>Basic pipeline</h2>
1027

1128
<p class="">
@@ -25,22 +42,7 @@ import pipelineCode from "./_main.nf?raw";
2542
lang="bash"
2643
title="Running the pipeline"
2744
frame="terminal"
28-
code={`nextflow run main.nf
29-
30-
N E X T F L O W ~ version 24.10.0
31-
Launching \`main.nf\` [peaceful-jepsen] DSL2 - revision: a9012339ce
32-
33-
executor > local (3)
34-
[ba/2ef6e7] process > splitSequences [100%] 1 of 1 ✓
35-
[37/1ef9a2] process > reverse (2) [100%] 2 of 2 ✓
36-
37-
sey lacol edoN
38-
tset a si sihT
39-
40-
Completed at: 16-Nov-2024 15:42:33
41-
Duration : 1.2s
42-
CPU hours : (a few seconds)
43-
Succeeded : 3`}
45+
code={terminalOutput}
4446
/>
4547

4648
### Key Concepts

0 commit comments

Comments
 (0)