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

feat: install modules at once #333

Merged
merged 4 commits into from
Jul 20, 2023
Merged

Conversation

Jannchie
Copy link
Contributor

Resolve #331

Implemented an install queue: I added an installQueue where the module name is pushed into the queue when the module starts installing. When the module installation is complete, the module name is removed from the queue.

Only when all modules are installed is the new configuration written to the file. This prevents an automatic reboot when updating the config, which would result in only one module being installed.


addNuxtModule(mod, name)

const generated = mod.generate().code
latestGenerated = generated // cache the latest generated config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to put in non-dry condition

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved!

@@ -54,6 +54,9 @@ export function setupNpmRPC({ nuxt, ensureDevAuthToken }: NuxtDevtoolsServerCont
}
}

const installQueue: string[] = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use a Set

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's been changed to Set.

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.

feat: Installing multiple modules at the same time
2 participants