UNPKG

express-api-creator

Version:

Scaffold an Express.js boilerplate project. You can generate express.js boilerplate code with a single command.

15 lines (12 loc) 442 B
import simpleGit from "simple-git"; import { color } from "console-log-colors"; const cloneRepo = async (repoUrl, destinationPath) => { try { const git = simpleGit(); await git.clone(repoUrl, destinationPath); console.log(color.green(`✔️ Repository cloned to ${destinationPath}`)); } catch (error) { console.error(color.red("❌ Failed to clone repository:"), error); } }; export default cloneRepo;