clone_github_repo() — svelte Function Reference
Architecture documentation for the clone_github_repo() function in download.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 0fabd0c7_1404_6544_c626_280ae1daba79["clone_github_repo()"] 65d20932_41e6_eeee_7338_5dd0682e5e42["download.js"] 0fabd0c7_1404_6544_c626_280ae1daba79 -->|defined in| 65d20932_41e6_eeee_7338_5dd0682e5e42 style 0fabd0c7_1404_6544_c626_280ae1daba79 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
playgrounds/sandbox/scripts/download.js lines 106–115
function clone_github_repo(url, target_dir) {
// Extract repo URL (handle both https://github.com/owner/repo and https://github.com/owner/repo/tree/branch/path)
const parts = url.pathname.split('/').filter(Boolean);
const owner = parts[0];
const repo = parts[1];
const repo_url = `https://github.com/${owner}/${repo}.git`;
console.log(`Cloning ${repo_url}...`);
execSync(`git clone --depth 1 ${repo_url} "${target_dir}"`, { stdio: 'inherit' });
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does clone_github_repo() do?
clone_github_repo() is a function in the svelte codebase, defined in playgrounds/sandbox/scripts/download.js.
Where is clone_github_repo() defined?
clone_github_repo() is defined in playgrounds/sandbox/scripts/download.js at line 106.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free