forked from nativescript-vue/nativescript-vue.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Vue Devtools docs, removed Templates, closes nativescript-vue#184
- Loading branch information
Showing
8 changed files
with
1,478 additions
and
1,439 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: Using Vue Devtools | ||
contributors: [rigor789] | ||
outdated: false | ||
--- | ||
|
||
To debug a NativeScript-Vue application with Vue Devtools you need to use the standalone version of Vue Devtools. | ||
|
||
To make integration easier we have published [`nativescript-vue-devtools`](https://github.com/nativescript-vue/nativescript-vue-devtools) which takes care of connecting to Vue Devtools. | ||
|
||
** 1. Install dependencies ** | ||
|
||
```shell | ||
$ cd <project-folder> | ||
$ npm install --save @vue/devtools nativescript-toast nativescript-socket.io | ||
``` | ||
|
||
** 2. Optionally install Vue Devtools globally ** | ||
|
||
If you'd like to easily access Vue Devtools, it's a good idea to install it globally. | ||
|
||
```shell | ||
$ npm install -g @vue/devtools | ||
``` | ||
|
||
This will allow you to run the `vue-devtools` command regardless of the current directory you are in. | ||
|
||
** 3. Install the `nativescript-vue-devtools` plugin into your app ** | ||
|
||
To connect your application to the devtools, you will have to make a slight modification to your `main.js`. | ||
Import `nativescript-vue-devtools` and tell NativeScript-Vue about it using `Vue.use()` | ||
|
||
```js | ||
import Vue from 'nativescript-vue' | ||
import VueDevtools from 'nativescript-vue-devtools' | ||
|
||
Vue.use(VueDevtools) | ||
``` | ||
|
||
** 4. Run Vue Devtools ** | ||
|
||
```shell | ||
$ # if installed globally | ||
$ vue-devtools | ||
$ # or | ||
$ npx vue-devtools | ||
``` | ||
|
||
** 5. Rebuild and run your app ** | ||
|
||
```shell | ||
$ rm -rf platforms | ||
$ tns run android --bundle | ||
$ # or | ||
$ tns run ios --bundle | ||
``` | ||
|
||
If everything went well, you should see a few components in the component tree of Vue Devtools. |
Oops, something went wrong.