Skip to content

Commit

Permalink
Add Atom Beta to launchEditor
Browse files Browse the repository at this point in the history
Summary:
Support [the pre-release of Atom](https://github.com/atom/atom/releases/tag/v1.16.0-beta0) for launchEditor in RN packager.

Open the pre-release of Atom and use the following code: (use the built-in [openFileInEditor](https://github.com/facebook/react-native/blob/292cc82d0ebc437a6f1cdd2e972b3917b7ee05a4/Libraries/Core/Devtools/openFileInEditor.js) module)

```js
import openFileInEditor from 'openFileInEditor'

openFileInEditor(file, lineNumber)
```
Closes #13255

Differential Revision: D4819130

Pulled By: ericvicenti

fbshipit-source-id: eb542295ee9489dad0fe9084e51c4141d33f1fbf
  • Loading branch information
jhen0409 authored and facebook-github-bot committed Apr 3, 2017
1 parent b4da59e commit d38644e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion local-cli/server/util/launchEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ function isTerminalEditor(editor) {
// of the app every time
var COMMON_EDITORS = {
'/Applications/Atom.app/Contents/MacOS/Atom': 'atom',
'/Applications/Atom Beta.app/Contents/MacOS/Atom Beta':
'/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',
'/Applications/Sublime Text.app/Contents/MacOS/Sublime Text':
'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
'/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2':
Expand Down Expand Up @@ -57,7 +59,7 @@ function getArgumentsForLineNumber(editor, fileName, lineNumber, workspace) {
case 'wstorm':
case 'appcode':
case 'charm':
case 'idea':
case 'idea':
return [fileName + ':' + lineNumber];
case 'joe':
case 'emacs':
Expand Down

0 comments on commit d38644e

Please sign in to comment.