convert_vite_project() — svelte Function Reference
Architecture documentation for the convert_vite_project() function in download.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD d621ae98_3549_c88b_34c1_d397784794ca["convert_vite_project()"] ca0827ed_7ca3_c9a0_ccc1_0cb7965a99ec["download.js"] d621ae98_3549_c88b_34c1_d397784794ca -->|defined in| ca0827ed_7ca3_c9a0_ccc1_0cb7965a99ec 7c9b1dfa_7627_0102_b438_1265467e5213["process_directory()"] 7c9b1dfa_7627_0102_b438_1265467e5213 -->|calls| d621ae98_3549_c88b_34c1_d397784794ca 80f6e8d9_9462_8230_5d1e_d0886e36829b["get_all_files()"] d621ae98_3549_c88b_34c1_d397784794ca -->|calls| 80f6e8d9_9462_8230_5d1e_d0886e36829b 3bdc3af7_1b21_7ce9_f177_10977d83b131["transform_lib_imports()"] d621ae98_3549_c88b_34c1_d397784794ca -->|calls| 3bdc3af7_1b21_7ce9_f177_10977d83b131 style d621ae98_3549_c88b_34c1_d397784794ca fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
playgrounds/sandbox/scripts/download.js lines 518–544
function convert_vite_project(repo_dir) {
const all_files = get_all_files(repo_dir);
/** @type {Array<{name: string, contents: string}>} */
const output_files = [];
// Find src directory
const src_files = all_files.filter(
(f) =>
f.path.startsWith('src/') &&
(f.name.endsWith('.svelte') || f.name.endsWith('.js') || f.name.endsWith('.ts'))
);
for (const file of src_files) {
// Flatten all files to root level (just the filename)
const new_path = path.basename(file.path);
let contents = file.contents;
contents = transform_lib_imports(contents);
output_files.push({
name: new_path,
contents
});
}
return output_files;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does convert_vite_project() do?
convert_vite_project() is a function in the svelte codebase, defined in playgrounds/sandbox/scripts/download.js.
Where is convert_vite_project() defined?
convert_vite_project() is defined in playgrounds/sandbox/scripts/download.js at line 518.
What does convert_vite_project() call?
convert_vite_project() calls 2 function(s): get_all_files, transform_lib_imports.
What calls convert_vite_project()?
convert_vite_project() is called by 1 function(s): process_directory.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free