fastify/fastify-cli

Only watch specified directory (--watch CLI param)

オープン

#787 opened on 2024/12/21

 (5 件のコメント) (2 件のリアクション) (0 人の担当者)JavaScript (174 件のフォーク)github user discovery
good first issue

Repository metrics

Stars
 (726 個のスター)
PR merge metrics
 (平均マージ 54m) (30d で 3 merged PRs)

説明

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

コントリビューターガイド