Skip to content

Support for adding multiple module at once #65

Closed

Description

@arashsheyda

Use case

It would be nice to be able to add multiple modules in one command, e.g. nuxi-ng module add @vueuse/nuxt @unocss/nuxt

and in some cases, we need to install multiple packages and add one of them into modules, e.g. vuefire

I'd love to help if needed, thanks

Activity

  1. angelhdzmultimedia commented on Jan 25, 2024

    @angelhdzmultimedia
    Contributor

    Any updates? I wanted to contibute but there was already a contribution to add this.
    I already added this in my own nuxi inspired CLI and it works nicely.
    Because multiple modules adding is not yet implemented, I had to add all the modules to add in an array,
    and then calling pnpx nuxi module add <module> inside the loop.

    It will be nice just joining the array as a string, and passing the string of modules to the command and adding them all in a same process.

  2. angelhdzmultimedia commented on Oct 15, 2024

    @angelhdzmultimedia
    Contributor

    👋💚 In the meantime, we can set a shell alias that executes a function with a loop and install each module in the array.

    Powershell:

    1. notepad $profile
    function nuxmo {
        foreach ($module in $args) {
            pnpx nuxt@latest module add $module --package-manager pnpm --git-init false
        }
    }
    1. nuxmo module1 module2 module3 ... module100 😁👀🔥🎉
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions