run() — astro Function Reference
Architecture documentation for the run() function in render-default.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD b2305d92_79d3_ab8e_a353_3987d6f14929["run()"] 9a929f9c_5ccf_5833_23d6_90612b8c9d1d["render-default.js"] b2305d92_79d3_ab8e_a353_3987d6f14929 -->|defined in| 9a929f9c_5ccf_5833_23d6_90612b8c9d1d 5859bb26_4e70_6d53_da16_27fa6a682cb2["run()"] 5859bb26_4e70_6d53_da16_27fa6a682cb2 -->|calls| b2305d92_79d3_ab8e_a353_3987d6f14929 style b2305d92_79d3_ab8e_a353_3987d6f14929 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmark/make-project/render-default.js lines 107–132
export async function run(projectDir) {
await fs.rm(projectDir, { recursive: true, force: true });
await fs.mkdir(new URL('./src/pages', projectDir), { recursive: true });
await fs.mkdir(new URL('./src/components', projectDir), { recursive: true });
await Promise.all(
Object.entries(renderFiles).map(([name, content]) => {
return fs.writeFile(new URL(`./src/${name}`, projectDir), content, 'utf-8');
}),
);
await fs.writeFile(
new URL('./astro.config.js', projectDir),
`\
import { defineConfig } from 'astro/config';
import timer from '@benchmark/timer';
import mdx from '@astrojs/mdx';
export default defineConfig({
integrations: [mdx()],
output: 'server',
adapter: timer(),
});`,
'utf-8',
);
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does run() do?
run() is a function in the astro codebase, defined in benchmark/make-project/render-default.js.
Where is run() defined?
run() is defined in benchmark/make-project/render-default.js at line 107.
What calls run()?
run() is called by 1 function(s): run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free