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

doric-console

v0.1.6

Published

一个轻量、针对跨平台框架[Doric](https://doric.pub/)开发者的调试面板。

Downloads

4

Readme

dConsole

一个轻量、针对跨平台框架Doric开发者的调试面板。

  • 支持日志(Logs)查看
  • 支持查看所有元素(Element
  • 支持对mvvm模式下的状态State记录,并支持回溯
  • 支持查看librariespluginsnodes

详情可参考下方截图

Usage

  1. 将 dConsole 添加到ts项目中,使用 npm安装:
$ npm install doric-console --save

在Panel的onCreate()回调方法里,通过openDConsole(context: BridgeContext)方法传入当前的context即可

import { openDConsole } from "doric-console";

onCreate() {
    openDConsole(this.context);
}

完成以上ts项目中的配置即可使用DConsole,如果需要在调试面板查看librariespluginsnodes, 则需要在iOS或者Andorid端进行以下配置。

  1. iOS端使用cocoapods引入
$ pod 'dConsole'

注册library

#import "dConsoleLibrary.h"

[Doric registerLibrary:[dConsoleLibrary new]];
  1. Andorid端在app目录中的 build.gradle 中添加依赖
dependencies {
    ......
    implementation "pub.doric:dconsole:0.1.6"
}

注册library

import pub.doric.library.dConsoleLibrary;

Doric.registerLibrary(new dConsoleLibrary());
  1. 开启和关闭

在native端开启或关闭DConsole的方法:

iOS端:

#import "dConsoleLibrary.h"

[[DConsoleManager instance] enableConsole:YES];  // 开启

[[DConsoleManager instance] enableConsole:NO];  // 关闭

Andorid端:

DConsoleManager.getInstance().enableConsole(true);  // 开启

DConsoleManager.getInstance().enableConsole(false);  // 关闭

在js端获取开关状态:

dconsolePlugin(context)
      .enableState()
      .then((isEnable) => {
        if (this.stateText !== undefined) {
          this.stateText.text = isEnable ? "已打开" : "已关闭";
        }
      });

Requirements

"peerDependencies": {
      "doric": "^0.10.22",
},

Screenshots

  • Log

可以通过底部的输入框执行Javascript语句,可调用当前Panel的function,比如可执行以下语句


this.getRootView().viewId
this.getRootView().height
this.getRootView().scaleX = 0.5
this.getRootView().scaleX = 1

| iOS | Android | | ---- | ---- | | | |

  • Element
  1. 控件的layoutConfig信息提前展示,比如(2 , 1)表示宽度most,高度为fit

0 表示 just 1 表示 fit 2 表示 most

  1. 支持点击元素高亮显示控件
  • Registry

| iOS | Android | | ---- | ---- | | | |

  • State