clean() — astro Function Reference
Architecture documentation for the clean() function in build.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 268890e3_eabf_9b31_c7b7_e4c2c6f1a52b["clean()"] 35c0b351_a315_b75b_aa2a_7f7a823ba60f["build.js"] 268890e3_eabf_9b31_c7b7_e4c2c6f1a52b -->|defined in| 35c0b351_a315_b75b_aa2a_7f7a823ba60f 66836503_9c73_8364_2f68_033932da2823["build()"] 66836503_9c73_8364_2f68_033932da2823 -->|calls| 268890e3_eabf_9b31_c7b7_e4c2c6f1a52b style 268890e3_eabf_9b31_c7b7_e4c2c6f1a52b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/cmd/build.js lines 123–131
async function clean(outdir, cleanDts) {
const files = await glob('**', {
cwd: outdir,
filesOnly: true,
ignore: cleanDts ? undefined : ['**/*.d.ts'],
absolute: true,
});
await Promise.all(files.map((file) => fs.rm(file, { force: true })));
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does clean() do?
clean() is a function in the astro codebase, defined in scripts/cmd/build.js.
Where is clean() defined?
clean() is defined in scripts/cmd/build.js at line 123.
What calls clean()?
clean() is called by 1 function(s): build.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free