Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace prompt function from react-dev-utils with Inquirer.js (#1767) #1772

Merged
merged 2 commits into from
May 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions packages/react-dev-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,29 +198,6 @@ if (openBrowser('http://localhost:3000')) {
}
```

#### `prompt(message: string, isYesDefault: boolean): Promise<boolean>`

This function displays a console prompt to the user.

By convention, "no" should be the conservative choice.<br>
If you mistype the answer, we'll always take it as a "no".<br>
You can control the behavior on `<Enter>` with `isYesDefault`.

```js
var prompt = require('react-dev-utils/prompt');

prompt(
'Are you sure you want to eat all the candy?',
/* isYesDefault */ false
).then(shouldEat => {
if (shouldEat) {
console.log('You have successfully consumed all the candy.');
} else {
console.log('Phew, candy is still available!');
}
});
```

#### `webpackHotDevClient.js`

This is an alternative client for [WebpackDevServer](https://github.com/webpack/webpack-dev-server) that shows a syntax error overlay.
Expand Down
1 change: 0 additions & 1 deletion packages/react-dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"launchEditor.js",
"openBrowser.js",
"openChrome.applescript",
"prompt.js",
"WatchMissingNodeModulesPlugin.js",
"webpackHotDevClient.js"
],
Expand Down
46 changes: 0 additions & 46 deletions packages/react-dev-utils/prompt.js

This file was deleted.

1 change: 1 addition & 0 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"fs-extra": "0.30.0",
"html-webpack-plugin": "2.28.0",
"http-proxy-middleware": "0.17.3",
"inquirer": "3.0.6",
"jest": "18.1.0",
"object-assign": "4.1.1",
"postcss-loader": "1.3.3",
Expand Down
Loading