Created
September 2, 2025 13:50
-
-
Save machour/28d0015ffa93fdf8ebe9357a7733d6da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| devtools({ | |
| editor: { | |
| name: 'WebStorm', | |
| open: async (path, lineNumber, columnNumber) => { | |
| const { exec } = await import('node:child_process') | |
| // build args | |
| const lineArg = lineNumber ? `--line ${lineNumber}` : '' | |
| const columnArg = columnNumber ? `--column ${columnNumber}` : '' | |
| // fire away | |
| exec( | |
| `open -na "WebStorm.app" --args ${lineArg} ${columnArg} "${path.replaceAll('$', '\\$')}"`, | |
| ) | |
| }, | |
| } | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment