fix(cli): create-starter

This commit is contained in:
Leifer Mendez
2022-12-11 21:58:13 +01:00
parent 7797c2b461
commit d3b8310180
7 changed files with 51 additions and 46 deletions

View File

@@ -16,9 +16,9 @@ const copyFiles = async (from, to) => {
* Copiar directorio con archivos
* @param {*} templateName
*/
const copyBaseApp = async (templateName = null, rootDir = process.cwd()) => {
const BASEP_APP_PATH_FROM = `${rootDir}/starters/apps/${templateName}`
const BASEP_APP_PATH_TO = `${rootDir}/${templateName}`
const copyBaseApp = async (fromDir = process.cwd(), toDir = process.cwd()) => {
const BASEP_APP_PATH_FROM = `${fromDir}`
const BASEP_APP_PATH_TO = `${toDir}`
await copyFiles(BASEP_APP_PATH_FROM, BASEP_APP_PATH_TO)
}