Skip to content

Commit

Permalink
Merge branch 'release/0.0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelengstrom committed Apr 8, 2024
2 parents 6d619dd + 9c4cb86 commit 5106008
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@frojdagency/jewl-cli",
"description": "CLI tool for Jewl. Import your components with ease",
"version": "0.0.6",
"version": "0.0.7",
"author": "Mikael Engström <[email protected]>",
"homepage": "https://github.com/Frojd/Frojd-Jewl/",
"bugs": {
Expand Down
9 changes: 5 additions & 4 deletions cli/src/commands/clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ export default class Clone extends Command {
this.error(`No component named ${componentName} found in local repository. Try "jewl list" to see available components`)
}

if (fse.existsSync(componentDestinationAbsPath)) {
this.error(`The path ${componentDestinationAbsPath} does already exist. Aborting...`)
}

const _package = await fse.readJson(path.join(componentAbsPath, 'package.json')).catch(error => {
this.error(`Component "${componentName}" package.json file unreadable or non existing: ` + error)
})

if (fse.existsSync(componentDestinationAbsPath)) {
this.warn(`The path ${componentDestinationAbsPath} does already exist. Skipping...`)
return
}

// TODO: Ask if dependency should be installed
if (_package.dependencies) {
await this.installDependencies(_package.dependencies)
Expand Down

0 comments on commit 5106008

Please sign in to comment.