-
Notifications
You must be signed in to change notification settings - Fork 10
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
Livedoc open #22
base: master
Are you sure you want to change the base?
Livedoc open #22
Conversation
that's a good idea but I'm not a fan of having two tasks for different platforms (and by the way, Linux task calls |
Both good points. The only problem with the second one - we can't run anything AFTER launching the server, since the server task remains active until shut down. I'm launching the browser before the server now, so you have to reload the page once, but other then that, everything works fine on my system. |
Again, there's a grunt contrib plugin to handle this. You can check grunt-shell-spawn or grunt-external-daemon or probably plenty of others. The current shape (opening the browser on an error page) is the worst situation. So the livedoc task should run the yuidoc server in the background (ideally check if it's already running before but I guess this will be hard so it's okish to always try to run the yuidoc server and to ignore the address already in use error) and then open (always) the browser to the address. |
…nt-wait and grunt-open)
@dpobel, how do you like this setup? I suppose, manual delay is inevitable, if we don't want to dive into output parsing... |
no, you are kind of force to wait because you set the In addition, this does not work because even if you set the This is explained in the documentation of child_process.spawn (which is used under the hood): When using the detached option to start a long-running process, the process will not stay running in the background unless it is provided with a stdio configuration that is not connected to the parent. If the parent's stdio is inherited, the child will remain attached to the controlling terminal. |
That's strange - this setup works perfectly fine on my system (W7). Additional window for the server is created and as long as it remains opened everything works fine.
How long does full server start takes on your system? 5 seconds is not enough on mine. |
That's not really strange, Windows and the rest of the world handles the processes in a quite different way and in addition grunt-shell-spawn uses the server starts in less than a second and even the doc generation takes less than 2 seconds (that was also the case on my previous poor laptop)... Anyway, let me take over this task so it works on most systems |
Doc generation takes the same on my system: But for the server it's not the case. After showing this line
it takes 4~5 seconds to continue to
and this without any other tasks in background...
Fair enough. You are welcome :) |
Added Grunt command to open livedoc instantly (both win and linux versions).
Linux version should be tested, though.