mydebuglog

1.0.7 • Public • Published

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')

Dependents (0)

Package Sidebar

Install

npm i mydebuglog

Weekly Downloads

6

Version

1.0.7

License

MIT

Unpacked Size

5.13 kB

Total Files

3

Last publish

Collaborators

  • qz1543706741
  • dustyface