run() — astro Function Reference
Architecture documentation for the run() function in index.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 2dba436b_7725_d01f_3245_84fb0de39a98["run()"] 1a43e707_1475_7dff_30dc_6b21c92d7be2["index.js"] 2dba436b_7725_d01f_3245_84fb0de39a98 -->|defined in| 1a43e707_1475_7dff_30dc_6b21c92d7be2 style 2dba436b_7725_d01f_3245_84fb0de39a98 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/index.js lines 2–22
export default async function run() {
const [cmd, ...args] = process.argv.slice(2);
switch (cmd) {
case 'dev':
case 'build': {
const { default: build } = await import('./cmd/build.js');
await build(...args, cmd === 'dev' ? 'IS_DEV' : undefined);
break;
}
case 'prebuild': {
const { default: prebuild } = await import('./cmd/prebuild.js');
await prebuild(...args);
break;
}
case 'test': {
const { default: test } = await import('./cmd/test.js');
await test(...args);
break;
}
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does run() do?
run() is a function in the astro codebase, defined in scripts/index.js.
Where is run() defined?
run() is defined in scripts/index.js at line 2.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free