Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch commands parameter => run command on watch triggered #569

Open
2 tasks done
adminy opened this issue Nov 27, 2022 · 1 comment
Open
2 tasks done

Watch commands parameter => run command on watch triggered #569

adminy opened this issue Nov 27, 2022 · 1 comment
Labels
help wanted Help the community by contributing to this issue semver-minor Issue or PR that should land as semver minor

Comments

@adminy
Copy link

adminy commented Nov 27, 2022

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'
@mcollina
Copy link
Member

mcollina commented Dec 3, 2022

Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.

@mcollina mcollina added semver-minor Issue or PR that should land as semver minor help wanted Help the community by contributing to this issue labels Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Help the community by contributing to this issue semver-minor Issue or PR that should land as semver minor
Projects
None yet
Development

No branches or pull requests

2 participants