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

Feature Request: multiple watches started #4

Open
dlmiles opened this issue Nov 5, 2014 · 3 comments
Open

Feature Request: multiple watches started #4

dlmiles opened this issue Nov 5, 2014 · 3 comments

Comments

@dlmiles
Copy link

dlmiles commented Nov 5, 2014

Currently only watch.gapreload is started.

It would be nice to have gapreload.options.watches = ['gapreload','foobar1','foobar2'] since I have different tasks for different file types to speed up incremental building. Note when configured the list replaces the default single watch of 'gapreload'. So if this is to occur it must be explicitly configured back in. This is the most versatile it allows renaming of that watch, it allows specifying the order they bootup (if thats ever important), it allows disabling all watches by providing an empty array (if thats ever important).

Then use concurrent to bootup all of them.

It is not possible to start a separate watch task from another terminal window / command prompt, because it links into livereload which runs its own websocket on the standard LIVERELOAD_PORT. So all the watch rules must be integrated into that livereload server setup.

@dlmiles
Copy link
Author

dlmiles commented Nov 5, 2014

I have described the problem inaccurately.

The issue isn't livereload but the need to run multiple watch configs at the same time (as it usual with watch). The gapreload plugin hardwires a single task watch:gapreload which is enabled for livereload. However in order to have seamless development/reload/debug cycles it is neccessary to just to run the task watch (which picks up all watch configs) and continue to have the 'gapreload' configured as the only livereload enabled watch, but also all the other watches the project needs.

The problem stems from (on windows at least) it is not allowed to run in a 2nd terminal window a grunt watch task for everything other then the gapreload configuration. It is necessary to have a single terminal window and run all watch tasks from there. For a start I could not find any simple way to exclude watch:gapreload but run all others.

So maybe the configuration can be simplified to be: gapreload.options.watchTaskName = 'watch'; Which will replace the default task of watch:gapreload.

@sebastien-p
Copy link
Member

I see. That's a great idea. So gapreload.options.watchTaskName default value would be 'watch:gapreload', allowing people to rename it or set it to 'watch' if needed. Should be easy enough to implement so that this makes it to the next release.

@sebastien-p
Copy link
Member

Actually, what do you think of a gapreload.options.extraWatchTasks option instead? The thing is we need to know the name of the GapReload watch task to be able to get the LiveReload port value (#2) and I see no real value in being able to change that name. GapReload being named gapreload makes it clear what the task does.

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

No branches or pull requests

2 participants