DoKit small micro-channel research and development program Assistant SDK released

Author: Pratt & Whitney Product Technology

Doraemon mini program debugger

A program to support small end debugging tool

Development Background

For small developers and testers students, many temporary debugging features require a separate development to support, such as viewing a small program information, phone information
and user information, such as scan code to open the page. These functions are similar for each applet, but also need to be developed separately encountered when similar needs.

We sort through internal precipitation of these common functions, form a set of functions - A Dream applet side debugging tools, open the external form of common tools can be small so that each program
can quickly access these general and with service code independent features, any such H5 door applet basic information, like the analog position.

A brief summary

DoKit applet side debugging tools, built many commonly used tools, to avoid duplication realize, once access, you will have a powerful tool collection.

Demonstration effect

A Dream Home applet end results presentation

Built-in function modules

  • information app



    for quickly viewing phone system information applet basic information, user information, authorization information and other basic information, to avoid repeated calls or open the phone settings applet native api to view it.

  • Analog position





    for small simulation program end position, including the position of the authorized location to view, position simulation, the recovery location settings, and other major functions, simulation and position anywhere reduction can be achieved by a single click,
    to realize how this function works is by wx.getLocation method of rewriting, and then simulate the position after position simulation, all calls within a small program position will return to the position you set in the query method, native methods will restore the recovery.

  • Cache management







    a powerful cache management panel that integrates all the operating functions of the cache, including setting up a cache, clear the cache, the cache is updated values, etc., can be very convenient in the cache management applet

  • Any H5 door



    can be opened in the applet h5 page scan code and by way of Paste Link, easy to operate

  • 更新版本

    当你的小程序进行代码更新时,为了获取最新的线上包需要重启小程序,该功能可以在你的小程序上
    通过点击更新操作,直接获取到最新的远程代码资源

快速上手

使用之前

在开始使用之前,你需要先阅读 微信小程序自定义组件 的相关文档。

如何使用

  1. 通过 npm 安装 npm install -s -d dokit-miniapp
  2. 然后从node_modules中将dist/目录拷贝到自己的项目中,然后按如下方式进行使用

在需要引用工具的页面 page.json 中引入组件

"usingComponents": {
    "dokit": "../../dist/index/index"
}

在 page.wxml 中使用组件

<dokit/>

在应用app.json中通过如下方式注册需要依赖的页面

"pages": [
    "dist/appInformation/appInformation",
    "dist/debug/debug",
    "dist/h5door/h5door",
    "dist/logs/logs",
    "dist/positionSimulation/positionSimulation",
    "dist/storage/storage",
    "dist/index/index"
  ]

由于微信小程序暂不支持开发环境和生产环境判断,请在生产环境手动删掉引用

后续规划

性能工具(含以下功能)

1. 小程序加载时间
2. 首页渲染时间
3. 进程内存展示

视觉工具

1. 控件检查
2. 接口请求性能分析
3. 缓存文件管理器
4. 授权开启管理工具

贡献

有任何意见或建议都欢迎提 issue

github地址

https://github.com/didi/DoraemonKit/tree/master/miniapp

加入DoKit交流QQ群

QQ 交流群

Guess you like

Origin www.cnblogs.com/puhuichanpin/p/11635101.html