From 7797c2b46133697e2a591adab2b67e66b34a1cfe Mon Sep 17 00:00:00 2001 From: Leifer Mendez Date: Sun, 11 Dec 2022 20:59:28 +0100 Subject: [PATCH] fix(cli): :zap: update cli copy --- packages/cli/create-app/index.js | 6 +++--- packages/cli/interactive/index.js | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/cli/create-app/index.js b/packages/cli/create-app/index.js index ce6f199..c00fe5b 100644 --- a/packages/cli/create-app/index.js +++ b/packages/cli/create-app/index.js @@ -16,9 +16,9 @@ const copyFiles = async (from, to) => { * Copiar directorio con archivos * @param {*} templateName */ -const copyBaseApp = async (templateName = null) => { - const BASEP_APP_PATH_FROM = `${process.cwd()}/starters/apps/${templateName}` - const BASEP_APP_PATH_TO = `${process.cwd()}/${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}` await copyFiles(BASEP_APP_PATH_FROM, BASEP_APP_PATH_TO) } diff --git a/packages/cli/interactive/index.js b/packages/cli/interactive/index.js index 6e30553..b6e6ee0 100644 --- a/packages/cli/interactive/index.js +++ b/packages/cli/interactive/index.js @@ -64,11 +64,6 @@ const startInteractive = async () => { // } // } - /** - * @deprecated - * Question - * @returns - */ // const cleanAllSession = async () => { // const answer = cleanTmp.toLowerCase() || 'n' // if (answer.includes('n')) return true