sass / node-sass

:rainbow: Node.js bindings to libsass
https://npmjs.org/package/node-sass
MIT License
8.5k stars 1.33k forks source link

Migrate to a better file watcher #636

Open paulmillr opened 9 years ago

paulmillr commented 9 years ago

Hey. Your file watcher (gaze) has 53 opened issues. Many bugs on various platforms.

Can we make a pull request that migrates the watching to chokidar? Chokidar is ultra-stable and is used in many popular projects.

kevva commented 9 years ago

+1, I basically chose gaze because it's widely used in gulp and seems to work there. But I'm all for a change.

paulmillr commented 9 years ago

Gulp is switching to chokidar ;) https://github.com/wearefractal/glob-watcher/pull/13

am11 commented 9 years ago

:+1: Lets make it a post-v2 (stable) change.

BTW, nice name for a watcher library: Chokidar (watchman in my lang) :p

sindresorhus commented 9 years ago

:+1:

callumlocke commented 9 years ago

FWIW, I've worked a lot with gaze, chokidar and sane. sane is the newest and least well known, but it is by far the most reliable in my experience. And I think it has the most sensible API. Worth a look.

am11 commented 9 years ago

@callumlocke, thanks for the suggestion. Will take a look.

jareware commented 9 years ago

:+1: would really like this!

villelahdenvuo commented 8 years ago

:+1: Gaze is using ancient deprecated dependencies.

saper commented 8 years ago

Some help is needed to fix the watcher tests, we had to disable them because the way the CLI was called didn't really work.

adamreisnz commented 8 years ago

+1 to swtich to chokidar, or at least update the gaze dependency, as the current version used by node-sass contains very outdated deps:

├─┬ gulp-sass@2.2.0
│ └─┬ node-sass@3.4.2
│   ├─┬ gaze@0.5.2
│   │ └─┬ globule@0.1.0
│   │   └── lodash@1.0.2 
cody-greene commented 8 years ago

Why does node-sass even include a --watch option? It just seems out of scope. In fact, other tools [including but not limited to] webpack need to set up their own file watchers to properly trigger auto reloading and hot swapping. Including this functionality in node-sass increases the surface area for bugs, , expands the required API and documentation, and inflates the dependency tree. And now the dependencies that gaze is using are printing multiple warnings because they're so old.

Why not improve the focus of this package and remove the --watch option entirely?

callumlocke commented 8 years ago

@cody-greene I think there is some value in having it, but agree it should be separated out from this module, eg sass vs sass-cli. Lots of other modules have made this change recently and it works well imo

cody-greene commented 8 years ago

@callumlocke Yes there is value in the feature. I can understand a few people are definitely using it. But I meant to suggest that the value provided is vastly overshadowed by these other issues.

GongT commented 7 years ago

Can I install a "chokidar version" of node-sass now 😍?!

node-sass can't watch files for a long time, and do not know why, now I'm using nodemon around node-sass... LOL

michaelwayman commented 7 years ago

Can I open a PR to switch to Chokidar?

The use of Gaze makes my CPU burn at 150-300% when using with docker for mac, with Chokidar my CPU runs at a normal 6-10%.

I will start working on this as it really prevents me from using node-sass, or docker-for-mac.

What do you need to see in my PR to get it merged?

Edit: I see a PR already open to do this https://github.com/sass/node-sass/pull/844 What is the holdup?