npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@wangjunjia/vue-devtools-remote-browser

v0.0.5

Published

fork form @vuejs/vue-devtools, add cli usage without electron

Downloads

2

Readme

thank vuejs and thanks evan you

fork from @vuejs/devtools and copy from packages/shell-electron, and I can't wait this pr 2076 because my project need it.

install

# when your just use cli and don't want install electron
export ELECTRON_SKIP_BINARY_DOWNLOAD=1 && npm install -g @wangjunjia/vue-devtools-remote-browser

usage

v-devtools # for use electron
v-devtools-cli # for without electron
PORT=8091 v-devtools-cli # for custom port , 8098 is default

demo gif


The following content is original repo.

vue-remote-devtools

This package provides a standalone vue-devtools application, that can be used to debug any Vue app regardless of the environment. Now you can debug your app opened in mobile browser, safari, native script etc. not just desktop chrome or firefox.

:cd: Installation

Install the package globally:

npm install -g @vue/devtools

Or locally as project dependency:

npm install --save-dev @vue/devtools

:rocket: Usage

Using global package

Once you installed the package globally, run:

vue-devtools # or use vue-devtools-cli without electron

Then add:

<script src="http://localhost:8098"></script>

Or if you want to debug your device remotely:

<script>
  window.__VUE_DEVTOOLS_HOST__ = '<your-local-ip>' // default: localhost
  window.__VUE_DEVTOOLS_PORT__ = '<devtools-port>' // default: 8098
</script>
<script src="http://<your-local-ip>:8098"></script>

To the <head> section of your app. (Don't forget to remove it before deploying to production!)

<your-local-ip> usually looks like this: 192.168.x.x.

Using dependency package

Once you installed the package as project dependency, run:

./node_modules/.bin/vue-devtools

You can also use the global vue-devtools to start the app, but you might want to check if the local version matches the global one in this scenario to avoid any incompatibilities.

Then import it directly in your app:

import devtools from '@vue/devtools'
// import Vue from 'vue'

Make sure you import devtools before Vue, otherwise it might not work as expected.

And connect to host:

if (process.env.NODE_ENV === 'development') {
  devtools.connect(/* host, port */)
}

host - is an optional argument that tells your application where devtools middleware server is running, if you debug you app on your computer you don't have to set this (the default is http://localhost), but if you want to debug your app on mobile devices, you might want to pass your local IP (e.g. http://192.168.1.12).

port - is an optional argument that tells your application on what port devtools middleware server is running. If you use proxy server, you might want to set it to null so the port won't be added to connection URL.

FAQ:

1. How to change port devtools server is running on?

You can change it by setting environment variable before running it:

PORT=8000 vue-devtools

Then in your app you'll have to set either:

window.__VUE_DEVTOOLS_PORT__ = 8000

Or update connect method with new port:

devtools.connect(/* host */, 8000)

2. How to remotely inspect page on the server?

For that you can use ngrok proxy. You can download it here.

Once you start vue-devtools run:

ngrok http 8098

Then update your host and port accordingly:

devtools.connect('https://example.ngrok.io', null)

Make sure to set port to null or false, because ngrok host already proxies to proper port that we defined in the first command.

3. How to inspect page served through HTTPS?

For that you can also use ngrok, as it automatically proxies https requests to http. Take a look at question number 2 for instructions.

4. How to inspect cordova applications?

Make sure that the page under http://your-ip:8098 is returning a javascript coode on your device/simulator. If it doesn't - make sure to check your anti-virus or router/firewall settings. If it works - please follow the instructions, and connect to devtools using your IP. For example:

import devtools from '@vue/devtools'
import Vue from 'vue'
// ...

function onDeviceReady () {
  devtools.connect('http://192.168.xx.yy') // use your IP
}

if (window.location.protocol === 'file:') {
  document.addEventListener('deviceready', onDeviceReady, false)
} else {
  onDeviceReady()
}

This will only work on development build of your app.

:beers: Development

  1. Install all dependencies
npm install
  1. Run:
npm run dev

This will watch src folder and compile files on change

  1. Run:
npm start

This will open electron app with devtools

  1. Follow Usage section to connect any app to your development version of vue-remote-devtools

:lock: License

MIT