luckyframework / lucky

A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
https://luckyframework.org
MIT License
2.57k stars 156 forks source link

Allow for customizing what files get watched in local dev #1767

Closed jwoertink closed 1 year ago

jwoertink commented 1 year ago

Purpose

Fixes #1747 Fixes #920

Description

Currently, if you use the websocket or SSE watchers, any changes made to your JS or CSS will fire off a recompile of the crystal side. Depending on what you use for your yarn watch command, this may already be happening through your js dev server anyway. This PR adds a way to customize this. If you want to watch your css and js in this manner, then you still can.

# config/watch.yml
host: 127.0.0.1
port: 3000
reload_port: 3001
extra_watch_paths:
  - ./public/css/**/*.css
  - ./public/js/**/*.js

This would also allow you to watch other files as well.

Checklist