All Projects → WeBankFinTech → wt-console

WeBankFinTech / wt-console

Licence: Apache-2.0 license
A lightweight, extendable react-native developer and tester tool

Programming Languages

javascript
184084 projects - #8 most used programming language
objective c
16641 projects - #2 most used programming language
HTML
75241 projects
Starlark
911 projects
java
68154 projects - #9 most used programming language
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to wt-console

rvw developers core
SFCC Developers Core Cartridge. A Salesforce Commerce Cloud (Demandware) Cartridge for Developers.
Stars: ✭ 43 (+38.71%)
Mutual labels:  console, debugging-tool
alerta-webui
Alerta Web UI 7.0
Stars: ✭ 84 (+170.97%)
Mutual labels:  console
douban.fm
简洁的豆瓣电台命令行版。
Stars: ✭ 13 (-58.06%)
Mutual labels:  console
console
a debugger for async rust!
Stars: ✭ 2,101 (+6677.42%)
Mutual labels:  console
yachalk
🖍️ Terminal string styling done right
Stars: ✭ 131 (+322.58%)
Mutual labels:  console
colorize
pub.dartlang.org/packages/colorize
Stars: ✭ 20 (-35.48%)
Mutual labels:  console
mini-me
Inline multiline text-editor/prompt written in Rust.
Stars: ✭ 23 (-25.81%)
Mutual labels:  console
android-sdk
AppSpector is a debugging service for mobile apps
Stars: ✭ 39 (+25.81%)
Mutual labels:  debugging-tool
xplr
A hackable, minimal, fast TUI file explorer
Stars: ✭ 2,271 (+7225.81%)
Mutual labels:  console
laravel-console-spinner
Customized loading ⌛ spinner for Laravel Artisan Console.
Stars: ✭ 70 (+125.81%)
Mutual labels:  console
px
ps and top for human beings
Stars: ✭ 151 (+387.1%)
Mutual labels:  console
CLI-Autocomplete
Cross-platform flexible autocomplete library for your CLI applications.
Stars: ✭ 21 (-32.26%)
Mutual labels:  console
tput.cr
Low-level component for building term/console applications in Crystal
Stars: ✭ 22 (-29.03%)
Mutual labels:  console
oof
Convenient, high-performance RGB color and position control for console output
Stars: ✭ 764 (+2364.52%)
Mutual labels:  console
fpga-virtual-console
VT220-compatible console on Cyclone IV EP4CE55F23I7
Stars: ✭ 33 (+6.45%)
Mutual labels:  console
Inquirer.cs
A collection of common interactive command line user interfaces. Port of Inquirer.js
Stars: ✭ 26 (-16.13%)
Mutual labels:  console
stylish-log
🎉 Stylish-log "A beautiful way to see your web console logs"
Stars: ✭ 12 (-61.29%)
Mutual labels:  console
ansicolor
A JavaScript ANSI color/style management. ANSI parsing. ANSI to CSS. Small, clean, no dependencies.
Stars: ✭ 91 (+193.55%)
Mutual labels:  console
pytermgui
Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!
Stars: ✭ 1,270 (+3996.77%)
Mutual labels:  console
log-utils
Basic logging utils: colors, symbols and timestamp.
Stars: ✭ 24 (-22.58%)
Mutual labels:  console

wt-console

Open Source Love JavaScript Style Guide

注:从WeTrident项目提炼而来。

📥 安装

  • npm i @webank/wt-console --save
  • yarn add @webank/wt-console

💡 背景

App开发过程中,经常会遇到一个场景就是,测试说我遇到一个xxx问题,但是不能复现,之前比较多的解决方案是基于文件日志。我们自己使用过程中发现文件日志太重,而且测试同学取日志的学习成本太高。于是在web项目中开始使用类似vConsole这一类的工具,又因为我们主要使用到的日志查看和日志上传功能。因此我们在React Native实现了类似vConsole的功能,同时在陆续扩展一些功能。

🌱 特性

  1. 添加一行代码即可在App内查看日志。
  2. 支持展示Network信息(目前支持fetch api的展示)。
  3. 收拢警告和错误提示,跟RN内烦人的底部黄色警告条说再见。

📱 截图

📗 用法说明

正式使用之前可以先使用snack版本体验,在线示例: https://snack.expo.io/@erichua23/wt-console-demo

基础用法

TianYan嵌入到App最外层View中:

import TianYan from '@webank/wt-console'

export default class SimpleApp extends Component {
  render () {
    return (
      <View style={styles.container}>
        {/* other view */}

        {/* 添加下面一行代码即完成接入 */}
        <TianYan />

      </View>
    )
  }
}

进阶用法

Console插件

默认会展示Console板块,内容类型Chrome中的Console板块。

Console插件支持三个参数:

  • showTimestamp 是否在日志前面展示时间戳。布尔类型,默认为false
  • ignoreRedBox 是否忽略RN对console.error默认的处理(默认会展示红屏)。布尔类型,默认为false
  • ignoreYellowBox 是否忽略RN对console.warn默认的处理(默认会在底部展示小黄条)。布尔类型,默认为false
<TianYan
  consoleOptions={{
    showTimestamp: true, // 展示日志时间戳
    ignoreRedBox: true, // 隐藏默认红屏
    ignoreYellowBox: true // 隐藏默认小黄条
  }}
/>

注:

  • 为什么引入ignoreRedBoxignoreYellowBox:因为RN对警告的处理比较暴力,直接使用浮窗在底部拦截操作,遇到警告比较多的时候非常烦人。官方提供的了ignore的方式,但是用官方的ignore,又担心某些需要关心的警告被忽略。wt-console采用了折中的策略,将黄色警告条去除后都收拢到wt-console的图标上展示,出现warning的时候开发者可以自有选择当前是否需要继续查看warning的详细信息。如下代码将错误和警告都收拢到wt-console统一管理。

Network插件

默认会展示Network板块,展示应用中的网络请求信息。同时支持一键重发指定请求。

开发调试

// 使用react-native-web进行演示
cd react-native-web-demo
npm i
npm run syncLib // 将 library 同步到 react-native-web-demo/src/ 下面
npm start // 将自动在浏览器打开

❤️ 我们的其他项目

🤝 类似项目

  • web-console:H5-based mobile web debugging tool similar to chrome devtools.
  • vConsole:A lightweight, extendable front-end developer tool for mobile web page.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].