From 84d341a91f0ab0c0cafc17a49bc23ffa7084631b Mon Sep 17 00:00:00 2001 From: Thadeu Cotts Date: Thu, 26 Nov 2020 15:00:41 -0300 Subject: [PATCH] [refactor] [s]: update copy methods --- packages/create-portal-app/helpers/copy.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/create-portal-app/helpers/copy.js b/packages/create-portal-app/helpers/copy.js index 38c846a2..85a086c8 100644 --- a/packages/create-portal-app/helpers/copy.js +++ b/packages/create-portal-app/helpers/copy.js @@ -2,17 +2,17 @@ const path = require("path"); const fs = require('fs'); const spawn = require('cross-spawn'); -function _parserPath(projectPath){ +function parserPath(projectPath){ return [process.cwd(), projectPath].join(path.sep) } function copy(root,destination){ - const destinationPath = _parserPath(destination) + const destinationPath = parserPath(destination) return spawn.sync('cp', ['-r', root, destinationPath]); } function isPathInUse(projectPath){ - const fullPath = _parserPath(projectPath) + const fullPath = parserPath(projectPath) const isPathExists = fs.existsSync(fullPath) if(isPathExists) { return fs.readdirSync(fullPath).length @@ -20,4 +20,4 @@ function isPathInUse(projectPath){ return isPathExists } -module.exports = { copy, isPathInUse } \ No newline at end of file +module.exports = { parserPath, copy, isPathInUse } \ No newline at end of file