mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-28 09:25:42 +08:00
Update envinfo and issue template (#4375)
* fix: update envinfo + implementation, update issue_template * update envinfo to 5.4.0, add IE and Edge to —info command,
This commit is contained in:
committed by
Ian Sutherland
parent
458336bef6
commit
7b2eae1745
21
.github/ISSUE_TEMPLATE.md
vendored
21
.github/ISSUE_TEMPLATE.md
vendored
@@ -85,19 +85,18 @@
|
||||
### Environment
|
||||
|
||||
<!--
|
||||
Please fill in all the relevant fields by running these commands in terminal.
|
||||
To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required.
|
||||
This enables the maintainers quickly reproduce the issue and give feedback.
|
||||
|
||||
Run the following command in your React app's folder in terminal.
|
||||
Note: The result is copied to your clipboard directly.
|
||||
|
||||
`npx create-react-app --info`
|
||||
|
||||
Paste the output of the command in the section below.
|
||||
-->
|
||||
|
||||
1. `node -v`:
|
||||
2. `npm -v`:
|
||||
3. `yarn --version` (if you use Yarn):
|
||||
4. `npm ls react-scripts` (if you haven’t ejected):
|
||||
|
||||
Then, specify:
|
||||
|
||||
1. Operating system:
|
||||
2. Browser and version (if relevant):
|
||||
|
||||
(paste the output of the command here)
|
||||
|
||||
### Steps to Reproduce
|
||||
|
||||
|
||||
@@ -121,15 +121,28 @@ const program = new commander.Command(packageJson.name)
|
||||
})
|
||||
.parse(process.argv);
|
||||
|
||||
if (program.info) {
|
||||
console.log(chalk.bold('\nEnvironment Info:'));
|
||||
return envinfo
|
||||
.run(
|
||||
{
|
||||
System: ['OS', 'CPU'],
|
||||
Binaries: ['Node', 'npm', 'Yarn'],
|
||||
Browsers: ['Chrome', 'Edge', 'Internet Explorer', 'Firefox', 'Safari'],
|
||||
npmPackages: ['react', 'react-dom', 'react-scripts'],
|
||||
npmGlobalPackages: ['create-react-app'],
|
||||
},
|
||||
{
|
||||
clipboard: true,
|
||||
duplicates: true,
|
||||
showNotFound: true,
|
||||
}
|
||||
)
|
||||
.then(console.log)
|
||||
.then(() => console.log(chalk.green('Copied To Clipboard!\n')));
|
||||
}
|
||||
|
||||
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>')}`
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"chalk": "^1.1.3",
|
||||
"commander": "^2.9.0",
|
||||
"cross-spawn": "^4.0.0",
|
||||
"envinfo": "3.4.2",
|
||||
"envinfo": "5.4.0",
|
||||
"fs-extra": "^5.0.0",
|
||||
"hyperquest": "^2.1.2",
|
||||
"react-dev-utils": "^5.0.0",
|
||||
|
||||
Reference in New Issue
Block a user