UNPKG

@storyblok/create-demo

Version:

A CLI tool for quickly starting a Storyblok project

17 lines (16 loc) 558 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const fs = require("node:fs"); const path = require("node:path"); const copyFolderSync = function (from, to) { fs.mkdirSync(to); for (const element of fs.readdirSync(from)) { if (fs.lstatSync(path.join(from, element)).isFile()) { fs.copyFileSync(path.join(from, element), path.join(to, element)); } else { copyFolderSync(path.join(from, element), path.join(to, element)); } } }; exports.default = copyFolderSync;