| 258 | } |
| 259 | |
| 260 | function printInstructions(fileName, errorMessage) { |
| 261 | console.log(); |
| 262 | console.log( |
| 263 | chalk.red('Could not open ' + path.basename(fileName) + ' in the editor.') |
| 264 | ); |
| 265 | if (errorMessage) { |
| 266 | if (errorMessage[errorMessage.length - 1] !== '.') { |
| 267 | errorMessage += '.'; |
| 268 | } |
| 269 | console.log( |
| 270 | chalk.red('The editor process exited with an error: ' + errorMessage) |
| 271 | ); |
| 272 | } |
| 273 | console.log(); |
| 274 | console.log( |
| 275 | 'To set up the editor integration, add something like ' + |
| 276 | chalk.cyan('REACT_EDITOR=atom') + |
| 277 | ' to the ' + |
| 278 | chalk.green('.env.local') + |
| 279 | ' file in your project folder ' + |
| 280 | 'and restart the development server. Learn more: ' + |
| 281 | chalk.green('https://goo.gl/MMTaZt') |
| 282 | ); |
| 283 | console.log(); |
| 284 | } |
| 285 | |
| 286 | let _childProcess = null; |
| 287 | function launchEditor(fileName, lineNumber, colNumber) { |