Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const tmp = require('tmp');
const unpack = require('tar-pack').unpack;
const url = require('url');
const hyperquest = require('hyperquest');
const envinfo = require('envinfo');

const packageJson = require('./package.json');

Expand All @@ -60,6 +61,7 @@ const program = new commander.Command(packageJson.name)
projectName = name;
})
.option('--verbose', 'print additional logs')
.option('--info', 'print environment debug info')
.option(
'--scripts-version <alternative-package>',
'use a non-standard version of react-scripts'
Expand Down Expand Up @@ -99,6 +101,14 @@ const program = new commander.Command(packageJson.name)
.parse(process.argv);

if (typeof projectName === 'undefined') {
if (program.info) {
envinfo.print({
packages: ['react', 'react-dom', 'react-scripts'],
noNativeIDE: true,
duplicates: true,
});
process.exit(0);
}
console.error('Please specify the project directory:');
console.log(
` ${chalk.cyan(program.name())} ${chalk.green('<project-directory>')}`
Expand Down
1 change: 1 addition & 0 deletions packages/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"chalk": "^1.1.1",
"commander": "^2.9.0",
"cross-spawn": "^4.0.0",
"envinfo": "^3.8.0",
"fs-extra": "^1.0.0",
"hyperquest": "^2.1.2",
"semver": "^5.0.3",
Expand Down