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

Use gaze instead of fs.watch to implement file watching. #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alecgorge
Copy link

Makes file watching more robust and fixes all issues for me. Addresses #87 and #41.

I was having issues with the old watch functionality. This fixes it for me.

…atching more robust and fixes all issues for me. Addresses techpines#87 and techpines#41
@bryanchriswhite
Copy link

It looks like you forgot to add gaze = require 'gaze'

@bryanchriswhite
Copy link

@alecgorge, have you manually tested this and confirmed that your changes work (esp. considering the fact that gaze = require 'gaze' was omitted from this commit)? I merged your branch with ours (and added the require statement) and i'm seeing some strange behavior. We've made changes of our own but I highly doubt they have any affect on this behavior.

I only tested stylus watching because i didn't have time to do any more but when I do have the time I'll be going back through and testing thoroughly to try to understand what is and isn't happening.

My brief experiment with stylus watching involved an assets.js with a rack containing stylusAsset with watch set to true:

...
var assets = new rack.Rack([
  new rack.StylusAsset({
    url: '/somewhere.css',
    filename: '/some/file.styl',
    watch: true
  }),
  ...
])
...

I simply changed the background color of an element and refreshed the page.

Normally the page looks like this:
screenshot 2013-11-27 12 13 20

The change I made to stylus should look like this:
screenshot 2013-11-27 12 13 54

This is what I got:
screenshot 2013-11-27 12 02 49

@bryanchriswhite
Copy link

Also, that same result (third image) happened when I changed the color property (instead of background-color to a completely different element.. so I'm clueless as to what's going on for the time being.

@alecgorge
Copy link
Author

I won't be able to take a good look at this for a few days but I have been
using this branch in production for several weeks without issues for some
simple stylus stuff.

Sent from my iPhone

On Nov 27, 2013, at 12:21 PM, Bryan White [email protected] wrote:

Also, that same result (third image) happened when I changed the
colorproperty (instead of
background-color to a completely different element.. so I'm clueless as to
what's going on for the time being.


Reply to this email directly or view it on
GitHubhttps://github.com//pull/105#issuecomment-29402657
.

@dankohn
Copy link

dankohn commented Jan 17, 2014

@alecgorge , could I please ping you again to update this pull request with the code you're using in production? We'd love to incorporate your changes and merge this.

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 this pull request may close these issues.

3 participants