fastify/fastify-cli

Watch commands parameter => run command on watch triggered

开放

#569 创建于 2022年11月27日

 (1 条评论) (0 个反应) (0 位负责人)JavaScript (174 个派生)github user discovery
help wantedsemver-minor

仓库指标

星标
 (726 个星标)
PR 合并指标
 (平均合并 54分钟) (30 天内合并 3 个 PR)

描述

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

Every time there is a file change I would like to run the standard command on the code, unfortunately there is no arguments that watch takes in to configure it to do that, but it seems like a very useful feature if we could do something pre/post watch event like spotting any linting issues and reporting them in the terminal.

Motivation

It seems like something a watch command should be able to do, since its not just a mechanism for hot server reload but sometimes it can be extra, like running a linter command.

Example

fastify start index.js -wPV --ignore-watch='node_modules .git .vscode' --on-watch-change='standard --fix'

贡献者指南