mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +08:00
Offer to set default browsers (#3792)
* Offer to set browser defaults * Catch error on no * Add ending newlines * Ensure we re-check to prevent defaults from leaking * Reduce nesting * Add defaults message * More explicit
This commit is contained in:
3
packages/react-scripts/scripts/eject.js
vendored
3
packages/react-scripts/scripts/eject.js
vendored
@@ -22,6 +22,7 @@ const paths = require('../config/paths');
|
||||
const createJestConfig = require('./utils/createJestConfig');
|
||||
const inquirer = require('react-dev-utils/inquirer');
|
||||
const spawnSync = require('react-dev-utils/crossSpawn').sync;
|
||||
const os = require('os');
|
||||
|
||||
const green = chalk.green;
|
||||
const cyan = chalk.cyan;
|
||||
@@ -218,7 +219,7 @@ inquirer
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(appPath, 'package.json'),
|
||||
JSON.stringify(appPackage, null, 2) + '\n'
|
||||
JSON.stringify(appPackage, null, 2) + os.EOL
|
||||
);
|
||||
console.log();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user