Comments (17)
+1 would like to watch a single file but can't seem ? (trying by CLI)
from watch.
+1 I think not only one file but also a glob expr should be accepted by the cli.
since we often need something like this:
watch "coffee -c *.coffee" *.coffee
from watch.
N.B. watch-run supports single files and globs, i.e.:
watch-run -p myfile "cp myfile dist/"
watch-run -p *.coffee "coffee -c *.coffee"
(just mentioning it since it appears watch isn't particularly actively maintained, and I found an alternative)
from watch.
Why not use http://nodejs.org/api/fs.html#fs_fs_watch_filename_options_listener if you are are only watching one file?
from watch.
Same reason I found this issue. +1
from watch.
It would be very useful to watch only one file using the CLI. +1
from watch.
+1 any update on this?
To answer @finnp, some configurations would benefit from this. For instance, my current configuration has an index.js
file and a src
file. If I were to change index.js
, watch
would not trigger a event.
watch "npm run js" index.js src
I may open a pull request.
from watch.
@tomwidmer thx
from watch.
@rgherk were you gonna create a PR for your implementation?
from watch.
+1 for this
from watch.
+1 from me too! Are you planning on implementing this or are we waiting for nothing? I'm asking as this conversation has now been open since Dec 10, 2014.
from watch.
@sarukuku it's a +1 from me and likely most watch users out there. I'm a contributor here and the plans are always to make everything is great as it can be. I don't have time at present. PRs absolutely welcome.
from watch.
@levithomason ofc, good to hear that this has been noted and that the issue isn't "dead". I'd like to help in fixing this but I think this kind of issue is out of my league. :)
from watch.
@levithomason it seems that @rgherk has created a possible fix for this. Could we use this?
from watch.
If anyone is still struggling with this, use https://github.com/Qard/onchange instead. I'm unsubscribing from this issue.
from watch.
@sarukuku watch
is hardly in my workflow anymore so it doesn't get much attention from me. I did ask @rgherk for some tests. Also, that PR is very outdated and needs rebased. My concern with merging it is that it refactors a core part of watch
with lots of business logic. I don't have time to grok it and make sure it is done right.
If there were some tests, I'd feel much better releasing it.
from watch.
N.B. watch-run supports single files and globs, i.e.:
watch-run -p myfile "cp myfile dist/" watch-run -p *.coffee "coffee -c *.coffee"
(just mentioning it since it appears watch isn't particularly actively maintained, and I found an alternative)
Ended up using @tomwidmer suggestion and it works great thanks!
from watch.
Related Issues (20)
- Error: ENOTDIR: not a directory, scandir HOT 5
- Action required: Greenkeeper could not be activated 🚨
- Action required: Greenkeeper could not be activated 🚨
- How to watch multiple directories? HOT 1
- Command is not shut down when file changes if long running process HOT 2
- Stop process from crashing if folder doesn't exist
- CLI: allow scrolling
- CLI - Get the change as parameter of the command HOT 1
- Upgrade merge to version 1.2.1 or later. HOT 6
- Watching Multiple Paths HOT 2
- Renaming a file for the first time does not trigger a delete event.
- Is this project still maintained? HOT 7
- Upgrade minimist to v.1.2.5
- mkdir -p issue
- [Electron] Old command is not halted when `watch` is re-triggered
- Upgrade minimist to v.1.2.6
- how to support hard disk space
- Not Found @cnakazawa/watch HOT 4
- Previous process not being killed
- Watch slow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watch.