Closed AWolf81 closed 5 years ago
If dependency panel is empty show a button that's saying Install dependencies. See screenshot below to see the state with-out dependencies. This button triggers a yarn call to install everything.
Yeah, that sounds good to me. I wonder if we should do this automatically, if we find ourselves in this situation...
It would also be good to have a menu option like Reinstall dependencies
which would delete node_modules
and run yarn
, as a way to force a cleanup in case the user winds up in a weird state.
The good thing about this is that we can also add a feature import from Github because there is also an installation needed. But that's a separate issue as this needs a git client to clone a repository.
Yeah, that's an exciting potential future set of tasks, github integration!
I'm working on this as it will be the base for the Git integration stuff.
I'm working on branch reinstall
. Not pushed yet.
Reinstall will first remove node_modules
folder and then it triggers yarn
.
No need to do a separate install action with-out removing node_modules as delete should fail silently.
I'll add Reinstall Dependencies
to Application menu\Current project\Reinstall Dependencies
.
Also there will be an Install button in UI if no dependencies are found and that will also trigger reinstall.
Do we need a confirm dialog to reinstall? Maybe we're showing a notification about what it will do and that it can take several minutes, what do you think? But I think it would be also OK to do it with-out notification as it's clear what a reinstall will do. I'll re-use the waiting spinner here as the reinstall will take some time.
This was completed in #318
During my work on #277 I've had a situation where I don't have a
node_modules
folder and Guppy can't run any tasks.At the delete performance issue, I'm deleting the
node_modules
folder and then move the project to trash. If the user restores the project from trash then we're having the situation mentioned above.Describe the solution you'd like If dependency panel is empty show a button that's saying
Install dependencies
. See screenshot below to see the state with-out dependencies. This button triggers ayarn
call to install everything. Afterwards we need to refresh the dependencies so we're having the installed dependencies available.I think we also need to add a check to
import-project.saga
. So we're checking ifnode_modules
is available and if not we're runningyarn
or should we always call it to ensure that everything is installed?The actual script that triggers the
yarn
call will be insidedependency.saga
and triggered with an actionTRIGGER_YARN_INSTALL
. That's needed because we're having two situations where thenode_modules
folder could be missing:node_modules
folder manually.The good thing about this is that we can also add a feature
import from Github
because there is also an installation needed. But that's a separate issue as this needs a git client to clone a repository.Screenshot