whistle.config

whistle 插件,监听项目根目录的配置文件并动态注册 whistle 匹配规则。

Usage no npm install needed!

<script type="module">
  import whistleConfig from 'https://cdn.skypack.dev/whistle.config';
</script>

README

whistle.config

whistle 插件,监听项目根目录的配置文件并动态注册 whistle 匹配规则。

使用指南

  1. 安装并启动 whistle: 安装启动配置 HTTPS
  2. 安装本插件:npm i -g whistle.config
  3. 进入你的项目根目录,新建 whistle.conf 文件,在其中配置 whistle 匹配规则
  4. 在项目启动时并行运行 whistle.config,如:whistle.confg & umi dev
    • whistle.confg 命令会监听配置文件,并将其规则注册至 whistle 中。

Example

在确保完成上述 1、2 步骤后,下载并运行示例项目。

git clone git@github.com:lei4519/whistle.config.example.git && 
cd whistle.config.example && 
yarn && 
yarn start

查看已注册的规则

两种方式(本质都一样):

  1. 访问 https://local.whistlejs.com/plugin.config/

  2. 访问 https://local.whistlejs.com,左侧菜单 -> plugins -> config

    image-20210810145512453

正常情况下通过 ctrl + c 等方式关闭进程时会将当前项目注册的规则删除掉,但是如果直接关机或关终端的方式则来不及执行操作。

此种情况可以自行在查看页面中点击对应规则的删除按钮进行删除。