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

Update upstream #2 #3

Merged
merged 4 commits into from
Feb 6, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Autodetect GoLand editor (facebook#3980)
ifedyukin authored and gaearon committed Feb 5, 2018
commit 03604a46f0fb3a38f306db687c59ce61de1dc2d2
7 changes: 7 additions & 0 deletions packages/react-dev-utils/launchEditor.js
Original file line number Diff line number Diff line change
@@ -57,6 +57,8 @@ const COMMON_EDITORS_OSX = {
'/Applications/WebStorm.app/Contents/MacOS/webstorm':
'/Applications/WebStorm.app/Contents/MacOS/webstorm',
'/Applications/MacVim.app/Contents/MacOS/MacVim': 'mvim',
'/Applications/GoLand.app/Contents/MacOS/goland':
'/Applications/GoLand.app/Contents/MacOS/goland',
};

const COMMON_EDITORS_LINUX = {
@@ -72,6 +74,7 @@ const COMMON_EDITORS_LINUX = {
sublime_text: 'sublime_text',
vim: 'vim',
'webstorm.sh': 'webstorm',
'goland.sh': 'goland',
};

const COMMON_EDITORS_WIN = [
@@ -93,6 +96,8 @@ const COMMON_EDITORS_WIN = [
'rubymine64.exe',
'webstorm.exe',
'webstorm64.exe',
'goland.exe',
'goland64.exe',
];

function addWorkspaceToArgumentsIfExists(args, workspace) {
@@ -155,6 +160,8 @@ function getArgumentsForLineNumber(
case 'rubymine64':
case 'webstorm':
case 'webstorm64':
case 'goland':
case 'goland64':
return addWorkspaceToArgumentsIfExists(
['--line', lineNumber, fileName],
workspace