question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It would nice to be able to use this as just:

yarn add --dev prettier
yarn prettier -- --write src/**/*.js --watch/-w

And only update the files that are changed as they are changed.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
jamiebuildscommented, Feb 2, 2017

I am using https://github.com/mikeal/watch to do effectively that:

watch 'prettier --write src/**/*.js' src

The problem is that it will just spawn up a new prettier process and go through every single file again

1reaction
eedrahcommented, Oct 31, 2017

@vjeux - I thought perhaps it might be nice to put in the README how to use this with an [external] watcher - that way it hopefully will please everyone wanting a watcher, without having requests to reimplement this functionality in the code of Prettier.

Thoughts? I made pull request #3126 if you want it.

For those who are coming here from Google wanting this functionality, the short version is:

npx onchange '**/*.js' -- npx prettier --write {{changed}}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Watching Files | gulp.js
The watch() API connects globs to tasks using a file system watcher. It watches for changes to files that match the globs and...
Read more >
Gulp v4 watch task - Stack Overflow
I've run my code like this and it works perfectly... //Do everything once! gulp.task('default', function(){ gulp.
Read more >
TaskWatch.ai Computer Vision + connected worker
TaskWatch keeps frontline workers handsfree and connected to emerging business events. A timely response deliveres improved security, enhanced customer ...
Read more >
Follow/Watch a Task - MeisterTask
Watching a task allows you to stay updated on the task's progress, even if it isn't assigned to you. Task watchers receive notifications...
Read more >
Manage task watchers - ClickUp Help
What you'll need; Watch a task; Manage task watchers; Other places you can manage watchers. Watchers are users who are notified when changes ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found