Skip to content

Commit 78430e3

Browse files
authored
docs: add cli interactive demo (#1612)
1 parent b926820 commit 78430e3

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

apps/docs/cli/workflows.mdx

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: "Building Codemod Workflows"
33
sidebarTitle: "Building Workflows"
44
---
55

6+
import { CLIDemo } from "/snippets/cli-demo.mdx";
7+
68
Codemod Workflows are self-hostable automations designed for running large-scale code transformation jobs.
79

810
## Core Features
@@ -21,6 +23,10 @@ Codemod Workflows can be run using [Codemod CLI](/cli/cli-reference) or [Codemod
2123

2224
## Quick Start
2325

26+
<Frame>
27+
<CLIDemo />
28+
</Frame>
29+
2430
<Steps>
2531
<Step title="Create a new codemod project">
2632
```bash
@@ -273,24 +279,21 @@ my-workflow/
273279
The folder—called a **workflow bundle**—is the root when you run `npx codemod@next workflow run ./my-workflow/`. `$CODEMOD_PATH` points here inside every task.
274280
275281
<Accordion title="Workflow Bundle & Loading Workflows">
276-
A <b>
277-
workflow bundle</b>
278-
279-
is a directory containing your <code>
280-
workflow.yaml</code>
281-
282-
and any scripts, rules, or assets referenced by your workflow.
282+
A workflow bundle is a directory containing your `workflow.yaml` and any scripts, rules, or assets referenced by your workflow.
283283
284-
- When you run <code>
285-
npx codemod@next workflow run ./my-workflow/</code>
284+
- When you run
285+
```bash
286+
npx codemod@next workflow run ./my-workflow/
287+
```
286288

287289
, the directory is used as the root for all relative paths.
288290
- You can also run a workflow directly from a file:
289291

290292
<br />
291293

292-
<code>
293-
npx codemod@next workflow run -w workflow.yaml</code>
294+
```bash
295+
npx codemod@next workflow run -w workflow.yaml
296+
```
294297

295298
<Info>
296299
Registry support (run workflows from remote sources) is planned for the future.
@@ -423,32 +426,14 @@ nodes:
423426

424427
<ParamField path="run" type="string">
425428
Inline shell command to execute.
426-
427-
<br />
428-
429-
<b>
430-
Provide either <code>
431-
run</code>
432-
433-
or <code>
434-
uses</code>
435-
436-
, not both.</b>
429+
430+
Provide either `run` or `uses`, not both.
437431
</ParamField>
438432

439433
<ParamField path="uses" type="object">
440434
Template call(s).
441435

442-
<br />
443-
444-
<b>
445-
Provide either <code>
446-
run</code>
447-
448-
or <code>
449-
uses</code>
450-
451-
, not both.</b>
436+
Provide either `run` or `uses`, not both.
452437
</ParamField>
453438

454439
## Matrix Strategy

apps/docs/snippets/cli-demo.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export const CLIDemo = () => {
2+
return (
3+
<div style={{ position: 'relative', paddingBottom: 'calc(62.5% + 41px)', height: 0, width: '100%' }}>
4+
<iframe
5+
src="https://demo.arcade.software/qpu8jeovSwfj5cDshEqp?embed&embed_mobile=inline&embed_desktop=inline&show_copy_link=true"
6+
title="Codemod CLI Demo"
7+
frameBorder="0"
8+
loading="lazy"
9+
allowFullScreen
10+
allow="clipboard-write"
11+
style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', colorScheme: 'light' }}
12+
/>
13+
</div>
14+
)
15+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy