Comparing version 7.0.0-0 to 7.0.0-1
14
hops.js
@@ -28,3 +28,4 @@ #!/usr/bin/env node | ||
.usage('Usage: $0 <command> [options]') | ||
.command('init <project-name>', 'Generates a new project with the specified name') | ||
.command('init <project-name>', 'Generates a new project with the ' + | ||
'specified name') | ||
.option('template', { | ||
@@ -118,3 +119,4 @@ type: 'string', | ||
var command = null; | ||
if (isYarnAvailable() && !options.npm) { | ||
var shouldUseYarn = isYarnAvailable() && !options.npm; | ||
if (shouldUseYarn) { | ||
command = [ | ||
@@ -139,2 +141,5 @@ 'yarn', | ||
try { | ||
if (options.verbose) { | ||
console.log('Executing command: "', command.join(' '), '"'); | ||
} | ||
execSync(command.join(' '), { stdio: 'inherit' }); | ||
@@ -145,3 +150,3 @@ } catch (error) { | ||
console.error(error); | ||
console.error('Command: "', command.join(' '), 'has failed.'); | ||
console.error('Command: "', command.join(' '), '" has failed.'); | ||
} | ||
@@ -172,3 +177,4 @@ process.exit(1); | ||
'not been installed.\n', | ||
'Please execute "yarn install" or "npm install" and retry.' | ||
'Please execute "' + (isYarnAvailable() ? 'yarn' : 'npm') + ' install"', | ||
'and retry.' | ||
); | ||
@@ -175,0 +181,0 @@ process.exit(1); |
{ | ||
"name": "hops-cli", | ||
"version": "7.0.0-0", | ||
"version": "7.0.0-1", | ||
"description": "Global CLI module to initialize new hops projects", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
6615
173
1