react-native-cli
Advanced tools
Comparing version 1.2.0 to 1.3.0
31
index.js
#!/usr/bin/env node | ||
'use strict'; | ||
/** | ||
@@ -36,4 +38,2 @@ * Copyright (c) 2015-present, Facebook, Inc. | ||
'use strict'; | ||
var fs = require('fs'); | ||
@@ -82,3 +82,3 @@ var path = require('path'); | ||
function getYarnVersionIfAvailable() { | ||
let yarnVersion; | ||
var yarnVersion; | ||
try { | ||
@@ -120,5 +120,24 @@ // execSync returns a Buffer -> convert to string | ||
} else { | ||
if (argv._.length === 0 && (argv.h || argv.help)) { | ||
console.log([ | ||
'', | ||
' Usage: react-native [command] [options]', | ||
'', | ||
'', | ||
' Commands:', | ||
'', | ||
' init <ProjectName> [options] generates a new project and installs its dependencies', | ||
'', | ||
' Options:', | ||
'', | ||
' -h, --help output usage information', | ||
' -v, --version output the version number', | ||
'', | ||
].join('\n')); | ||
process.exit(0); | ||
} | ||
if (commands.length === 0) { | ||
console.error( | ||
'You did not pass any commands, did you mean to run `react-native init`?' | ||
'You did not pass any commands, run `react-native --help` to see a list of all available commands.' | ||
); | ||
@@ -254,3 +273,3 @@ process.exit(1); | ||
const yarnVersion = (!forceNpmClient) && getYarnVersionIfAvailable(); | ||
let installCommand; | ||
var installCommand; | ||
if (yarnVersion) { | ||
@@ -261,3 +280,3 @@ console.log('Using yarn v' + yarnVersion); | ||
} else { | ||
console.log('Installing ' + getInstallPackage(rnPackage) + ' from npm...'); | ||
console.log('Installing ' + getInstallPackage(rnPackage) + '...'); | ||
if (!forceNpmClient) { | ||
@@ -264,0 +283,0 @@ console.log('Consider installing yarn to make this faster: https://yarnpkg.com'); |
{ | ||
"name": "react-native-cli", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"license": "BSD-3-Clause", | ||
@@ -5,0 +5,0 @@ "description": "The React Native CLI tools", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15275
306