Skip to content

Commit 371e70b

Browse files
committed
refactor: adjust comments
1 parent b1875d3 commit 371e70b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/utils/src/lib/command.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,19 @@ export interface FormatCommandLogOptions {
6767
*
6868
* @param {FormatCommandLogOptions} options - Command formatting options.
6969
* @returns {string} - ANSI-colored formatted command string.
70+
*
71+
* @example
72+
*
73+
* formatCommandLog({cwd: 'tools/api', env: {API_KEY='•••' NODE_ENV='prod'}, command: 'node', args: ['cli.js', '--do', 'thing', 'fast']})
74+
* ┌──────────────────────────────────────────────────────────────────────────┐
75+
* │ tools/api $ API_KEY="•••" NODE_ENV="prod" node cli.js --do thing fast │
76+
* │ │ │ │ │ │ │
77+
* │ └ cwd │ │ │ └ args. │
78+
* │ │ │ └ command │
79+
* │ │ └ env variables │
80+
* │ └ prompt symbol ($) │
81+
* └──────────────────────────────────────────────────────────────────────────┘
82+
*
7083
*/
7184
export function formatCommandLog(options: FormatCommandLogOptions): string {
7285
const { command, args = [], cwd = process.cwd(), env } = options;

0 commit comments

Comments
 (0)