1.0.7 • Published 3 years ago

mydebuglog v1.0.7

Weekly downloads
13
License
MIT
Repository
-
Last release
3 years ago

README

安装

通过npm install mydebuglog --save-dev引入模块

使用

1. (推荐)通过终端命令行直接运行npm run serve -- --debuglog=modelName1,modelName2...

  • 在vue.config.js中引入MyDebugLogConfig模块 const { MyDebugLogConfig } = require('myDebugLog');并在chainWebpack中引用

2. 在浏览器url添加debuglog=modelName1,modelName2...,用逗号或者空格隔开

3. (Vue项目)通过终端运行 npm run debuglog 运行项目

  • debuglog脚本配置:"debuglog": "vue-cli-service serve --mode debuglog"
  • 配置文件:在项目根目录下添加.env.debuglog配置文件,并在文件内添加变量名 VUE_APP_DEBUGLOGLIST=modelName1,modelName2...

用逗号或者空格隔开

代码示例

在需要打印对应模块的代码中创建对应的实例,并给实例传递要打印的信息

const { MyDebugLog } = require('mydebuglog');  
const myDebuglog = MyDebugLog('modele1');
myDebuglog('show modele1 log')
1.0.7

3 years ago

1.0.6

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago