Skip to content
  • Sponsor facebook/create-react-app

  • Notifications You must be signed in to change notification settings
  • Fork 27k
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 22391ca

Browse files
committedApr 28, 2018
fix: update envinfo + implementation, update issue_template
# Conflicts: # packages/create-react-app/package.json
1 parent 458336b commit 22391ca

File tree

3 files changed

+30
-18
lines changed

3 files changed

+30
-18
lines changed
 

‎.github/ISSUE_TEMPLATE.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,18 @@
8585
### Environment
8686

8787
<!--
88-
Please fill in all the relevant fields by running these commands in terminal.
89-
-->
88+
To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required.
89+
This enables the maintainers quickly reproduce the issue and give feedback.
9090
91-
1. `node -v`:
92-
2. `npm -v`:
93-
3. `yarn --version` (if you use Yarn):
94-
4. `npm ls react-scripts` (if you haven’t ejected):
91+
Run the following command in your react app's folder in terminal.
92+
Note: The result is copied to your clipboard directly.
9593
96-
Then, specify:
94+
`npx create-react-app --info`
9795
98-
1. Operating system:
99-
2. Browser and version (if relevant):
96+
Paste the output of the command in the section below.
97+
-->
10098

99+
(paste the output of the command here)
101100

102101
### Steps to Reproduce
103102

‎packages/create-react-app/createReactApp.js

+21-8
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,28 @@ const program = new commander.Command(packageJson.name)
121121
})
122122
.parse(process.argv);
123123

124+
if (program.info) {
125+
console.log(chalk.bold('\nEnvironment Info:'));
126+
return envinfo
127+
.run(
128+
{
129+
System: ['OS', 'CPU'],
130+
Binaries: ['Node', 'npm', 'Yarn'],
131+
Browsers: ['Chrome', 'Firefox', 'Safari'],
132+
npmPackages: ['react', 'react-dom', 'react-scripts'],
133+
npmGlobalPackages: ['create-react-app'],
134+
},
135+
{
136+
clipboard: true,
137+
duplicates: true,
138+
showNotFound: true,
139+
}
140+
)
141+
.then(console.log)
142+
.then(() => console.log(chalk.green('Copied To Clipboard!\n')));
143+
}
144+
124145
if (typeof projectName === 'undefined') {
125-
if (program.info) {
126-
envinfo.print({
127-
packages: ['react', 'react-dom', 'react-scripts'],
128-
noNativeIDE: true,
129-
duplicates: true,
130-
});
131-
process.exit(0);
132-
}
133146
console.error('Please specify the project directory:');
134147
console.log(
135148
` ${chalk.cyan(program.name())} ${chalk.green('<project-directory>')}`

‎packages/create-react-app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"chalk": "^1.1.3",
2525
"commander": "^2.9.0",
2626
"cross-spawn": "^4.0.0",
27-
"envinfo": "3.4.2",
27+
"envinfo": "5.2.0",
2828
"fs-extra": "^5.0.0",
2929
"hyperquest": "^2.1.2",
3030
"react-dev-utils": "^5.0.0",

0 commit comments

Comments
 (0)
Please sign in to comment.