fastify/fastify-cli

Only watch specified directory (--watch CLI param)

开放

#787 创建于 2024年12月21日

 (5 条评论) (2 个反应) (0 位负责人)JavaScript (174 个派生)github user discovery
good first issue

仓库指标

星标
 (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

Allow a directory (or list of directories) to be passed into the --watch param

Motivation

In my project, I have a small API subfolder. When I turn on --watch, it is monitoring my entire project root for changes, which leads to resets constantly.

Example

Right now the only solution is to do something like this:

fastify start --watch --ignore-watch '.git node_modules out .next content public scripts utils styles pages config compontents' --log-level info --pretty-logs --port ${API_PORT:-4321} api/server.js

I would rather do this:

fastify start --watch api --log-level info --pretty-logs --port ${API_PORT:-4321} api/server.js

贡献者指南