Home / Function/ getRunCommand() — vite Function Reference

getRunCommand() — vite Function Reference

Architecture documentation for the getRunCommand() function in index.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  a98fac98_65d4_fff2_41b7_d0dbf3ca8339["getRunCommand()"]
  ebed723b_f143_390f_439d_dfaa680d6d16["index.ts"]
  a98fac98_65d4_fff2_41b7_d0dbf3ca8339 -->|defined in| ebed723b_f143_390f_439d_dfaa680d6d16
  21c23839_d37b_7105_7569_d8c6f394b60d["start()"]
  21c23839_d37b_7105_7569_d8c6f394b60d -->|calls| a98fac98_65d4_fff2_41b7_d0dbf3ca8339
  6d5b7f61_22fe_5498_a292_5c478890d5f3["init()"]
  6d5b7f61_22fe_5498_a292_5c478890d5f3 -->|calls| a98fac98_65d4_fff2_41b7_d0dbf3ca8339
  style a98fac98_65d4_fff2_41b7_d0dbf3ca8339 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/create-vite/src/index.ts lines 934–945

function getRunCommand(agent: string, script: string) {
  switch (agent) {
    case 'yarn':
    case 'pnpm':
    case 'bun':
      return [agent, script]
    case 'deno':
      return [agent, 'task', script]
    default:
      return [agent, 'run', script]
  }
}

Subdomains

Called By

Frequently Asked Questions

What does getRunCommand() do?
getRunCommand() is a function in the vite codebase, defined in packages/create-vite/src/index.ts.
Where is getRunCommand() defined?
getRunCommand() is defined in packages/create-vite/src/index.ts at line 934.
What calls getRunCommand()?
getRunCommand() is called by 2 function(s): init, start.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free