0.1.5 • Published 3 years ago
devtools-pro v0.1.5
🎉 Features
📦 Installation
npm i -g devtools-pro
# OR
yarn global add devtools-pro
命令行配置项
devtools-pro -h
# or
dp -h
Options:
-h, --help Show help [boolean]
--plugins Add plugins [array]
--config Provide path to a devtools configuration file e.g.
./devtools.config.js [string] [default: "devtools.config"]
-o, --open Open browser when server start [boolean] [default: true]
--https Use HTTPS protocol. [boolean]
-p, --port Port to use [8001] [number]
-proxyPort Proxy server port to use [8002] [number]
--verbose Displays verbose logging [boolean] [default: false]
--hostname Address to use [0.0.0.0] [string]
-v, --version Show version number [boolean]
配置文件devtools.config.js
为了方便项目统一配置,DevTools-pro 支持配置文件,可以在项目中创建一个名为devtools.config.js
的文件,支持的配置项如下:
- logLevel:日志级别,支持
silent
verbose
- sslCaDir:ca 证书目录,默认在
findcachedir('ssl')
中生成 - port:server 端口号,默认
8001
- hostname:默认
0.0.0.0
- plugins:配置插件,介绍
- https:如果要启用 https,可以设置
https=true
,DevTools-pro 会自动生成 CA 证书供使用 - proxy:
proxy.port
:代理服务器的端口号,默认 8002proxy.plugins
:Foxy 插件proxy.blockingFilter
:拦截过滤器,详见Foxy 文档
开发
- clone
mkdir devtools-pro
git clone git@github.com:ksky521/devtools-pro.git devtools-pro
- 安装依赖 & 初始化
yarn
# 初始化:将chrome-devtools-frontend/front_end复制出来
sh init.sh
- 开始开发
yarn dev
访问:
- 打开 home 页面:127.0.0.1:8001
- 打开 demo 测试页面:点击 home 页面上测试页面链接 127.0.0.1:8001/demo.html
- 打开 inspector:点击 home 页面上的【Open Chrome DevTools】
深入阅读
0.2.0-alpha.4
3 years ago
0.2.0-alpha.3
3 years ago
0.2.0-alpha.6
3 years ago
0.2.0-alpha.5
3 years ago
0.2.0-alpha.2
4 years ago
0.2.0-alpha.1
4 years ago
0.2.0-alpha
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago
0.0.1
4 years ago