You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/open-in-editor.md
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -6,30 +6,34 @@ Nuxt supports this feature out-of-the-box. Make sure to be in debug mode.
6
6
7
7
## Webpack
8
8
9
-
In your Vue project, install the [express-open-in-editor](https://github.com/lahmatiy/express-open-in-editor) package and modifiy your webpack configuration:
9
+
In your Vue project, install the [launch-editor-middleware](https://github.com/yyx990803/launch-editor#middleware) package and modifiy your webpack configuration:
10
10
11
11
1. Import the package:
12
12
13
13
```js
14
-
var openInEditor =require('express-open-in-editor')
14
+
var openInEditor =require('launch-editor-middleware')
15
15
```
16
16
17
17
2. In the `devServer` option, register the `/__open-in-editor` HTTP route:
18
18
19
19
```js
20
20
devServer: {
21
21
before (app) {
22
-
app.use('/__open-in-editor', openInEditor({
23
-
editor:'code'
24
-
}))
22
+
app.use('/__open-in-editor', openInEditor())
25
23
}
26
24
}
27
25
```
28
26
29
-
3. You can change `'code'` with the editor you are using, see the [supported editors list](https://github.com/lahmatiy/open-in-editor#editor).
27
+
3.The editor to launch is guessed. You can also specify the editor app with the `editor` option. See the [supported editors list](https://github.com/lahmatiy/open-in-editor#editor).
30
28
31
-
You can now click on the name of the component in the Component inspector pane (if the devtools knows about its file source, a tooltip will appear).
29
+
```js
30
+
openInEditor({
31
+
editor:'code'
32
+
})
33
+
```
34
+
35
+
4. You can now click on the name of the component in the Component inspector pane (if the devtools knows about its file source, a tooltip will appear).
32
36
33
37
## Node.js
34
38
35
-
You can use the [open-in-editor](https://github.com/lahmatiy/open-in-editor) package to setup an HTTP route with the `/__open-in-editor` path. It will receive `file` as an URL variable.
39
+
You can use the [launch-editor](https://github.com/yyx990803/launch-editor#usage) package to setup an HTTP route with the `/__open-in-editor` path. It will receive `file` as an URL variable.
0 commit comments