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

Move the core of this task to a consumable lib? #17

Closed
shama opened this issue Nov 18, 2012 · 1 comment
Closed

Move the core of this task to a consumable lib? #17

shama opened this issue Nov 18, 2012 · 1 comment

Comments

@shama
Copy link
Member

shama commented Nov 18, 2012

Reference gruntjs/grunt#522. The grunt-reload task currently relies on a persistent variable set and then having the watch task call it to trigger a reload event. Since the watch task now spawns tasks as child processes this doesn't work anymore.

Should we consider moving the core of this watch task into a lib so other tasks can consume to be notified of watch events? Semi-related to #14. My grunt-hub task would also benefit from this as I duplicate a lot of the functionality there.

Here would be an example on how another task would implement:

var watch = require('grunt-contrib-watch');
watch.on('changed', function(filepath) {
  console.log(this.target); // target that triggered the event
  triggerReload(this.target);
});
// or on all events
watch.on('all', function(event, filepath) {});
@shama
Copy link
Member Author

shama commented Feb 5, 2013

Nope. At least not now.

@shama shama closed this as completed Feb 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant