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

@jeryqwq/vue-vconsole-devtools

v0.0.1

Published

vConsole vue-devtools plugin. Debug vue anywhere

Downloads

12

Readme

# Vue-vConsole-devtools

Vue-vConsole-devtools 是一款vConsole插件,把Vue.js官方调试工具vue-devtools移植到移动端,可以直接在移动端查看调试Vue.js应用

Preview

CodePen Sample Code for Vue2

CodePen Sample Code for Vue3

桌面使用:

Desktop

移动端使用:

Mobile

为什么需要本插件:

  1. 在Safari和移动端无法直接调试Vue.js
  2. Electron版本的devtools安装和远程调试配置非常麻烦

功能

  1. 移植了官方Vue-devtools的全部功能
  2. 针对移动端优化了部分操作方式
  3. 现已支持微信端内浏览器

使用方式

NPM方式引入

  1. npm i -s vue-vconsole-devtools

  2. 在工程中入口文件 (如src/main.js

...
import VConsole from "vconsole";
import { initPlugin } from 'vue-vconsole-devtools'
initPlugin(new VConsole()); // 需要在创建Vue根实例前调用
...

CDN方式引入

<script src="https://unpkg.com/vconsole/dist/vconsole.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue_plugin.js"></script>
<script>
  var vConsole = new window.VConsole();
  const Devtools = window.vueVconsoleDevtools
  Devtools.initPlugin(vConsole);
</script>

高级用法

  1. 只在开发环境下引入

    new Vue({
      render: (h) => h(App),
    }).$mount("#app");
       
    // 在创建跟实例以后调用, 需要借助webpack的异步模块加载能力
    if(process.env.NODE_ENV === "development"){
       Promise.all([import("vconsole"), import("vue-vconsole-devtools")]).then(
         (res) => {
           if (res.length === 2) {
             Vue.config.devtools = true;
             window.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit("init",Vue)
             const VConsole = res[0].default;
             const Devtools = res[1].default;
             Devtools.initPlugin(new VConsole());
           }
         }
       );
     }

更新日志

v1.0.5

  1. 兼容CDN引入,优化引入方式
  2. 兼容ES6 解构运算符引入方式

v1.0.0

  1. 重大更新,升级Vue-devtools V6
  2. 兼容Vue3

v0.0.7

  1. 重要更新,解决iOS微信端浏览器兼容性问题
  2. 解决iOS阿里mPass容器兼容性问题

v0.0.3

  1. 优化了打包体积

TODO:

  1. 支持Vue.js 3 ✅
  2. 开发脱离vConsole版本
  3. webpack plugin

### Sample code

Github

欢迎添加微信 **OmniBug **探讨交流,Email: [email protected]

## Contributors ✨

wangxinkai💻 📖