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

emit update when the template is changed the first time when the event =... #370

Merged
merged 2 commits into from
Mar 11, 2015

Conversation

MaxKramnik
Copy link
Contributor

...= "add". The template would not update when it is modified first time. The watcher listens only to the "change" event. The first event is actually "add".

@jlongster
Copy link
Contributor

Isn't add when a new file is created? Are you saying that when you first fire up the app, load a page, and change an existing template the updates don't show up the first time? I can't reproduce that.

@MaxKramnik
Copy link
Contributor Author

James,

Yeah, load the page, then make a template file change, refresh the page, the change is not there. If you make another change, save, refresh the page, both changes show up.

Thanks,

Max

On Mar 9, 2015, at 8:06 AM, James Long notifications@github.com wrote:

Isn't add when a new file is created? Are you saying that when you first fire up the app, load a page, and change an existing template the updates don't show up the first time? I can't reproduce that.


Reply to this email directly or view it on GitHub.

@jlongster
Copy link
Contributor

I think we can take the ignoreInitial option off actually. Without it the add event is emitted immediately, and we will just ignore it. The first save should then be a change event. I can't remember why we added that option. Chokidar may have changed behavior in a recent version.

Can you update your PR to remove that option?

@MaxKramnik
Copy link
Contributor Author

Removing ignoreInitial worked, thanks!

jlongster added a commit that referenced this pull request Mar 11, 2015
emit update when the template is changed the first time when the event =...
@jlongster jlongster merged commit eaa0f78 into mozilla:master Mar 11, 2015
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.

None yet

2 participants