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 mode interacts poorly when stdout is not a TTY #793

Closed
kevinburke1 opened this issue Feb 11, 2021 · 1 comment
Closed

--watch mode interacts poorly when stdout is not a TTY #793

kevinburke1 opened this issue Feb 11, 2021 · 1 comment

Comments

@kevinburke1
Copy link

kevinburke1 commented Feb 11, 2021

I use a process manager to start both esbuild in --watch mode and nginx (which we use to terminate TLS for local development)

watch:
	goreman --set-ports=false --exit-on-error start

This reads the instructions out of a Procfile

alb: nginx -p ./fs -c etc/nginx/nginx.conf
watcher: ./node_modules/.bin/esbuild --watch --color=false src/index.jsx

Each time the three dots change, a new line is drawn to the output:

$ make watch
envdir envs/localdev goreman --set-ports=false --exit-on-error start
15:23:38     alb | nginx: [alert] could not open error log file: open() "/usr/local/var/log/nginx/error.log" failed (13: Permission denied)
15:23:38 watcher | ~/src/github.com/meterup/dashboard ~/src/github.com/meterup/dashboard
15:23:38 watcher | + ./node_modules/.bin/esbuild ./src/index.jsx --watch --color=false
▫▫▫ 3:39 watcher |
▪▫▫ 3:39 watcher |
▪▪▫ 3:40 watcher |
▪▪▪ 3:40 watcher |
▫▪▪ 3:41 watcher |
▫▫▪ 3:41 watcher |

It would be nice if the --watch tool could detect a TTY and avoid printing the bubbles if so, since they just clutter the screen.

Further, echoing the request in #751 it would be nice if it was possible to see somehow that esbuild was detecting changes and doing something, especially since the rebuild process is polling-driven and not file-event driven.

@evanw
Copy link
Owner

evanw commented Feb 13, 2021

See also #742. You can use the log level option to disable this in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants