Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

feat(nuxi): move module-builder to unified nuxi cli #7606

Closed
wants to merge 4 commits into from

Conversation

cpreston321
Copy link
Contributor

@cpreston321 cpreston321 commented Sep 16, 2022

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Move core functionality from nuxt-module-builder -> nuxi

CLI Options

Command: npx nuxi build-module [--stub] [--outDir] [rootDir]

  • [Added]: new command build-module
    • [rootDir]: The rootDir
    • [--stub]: stub directory for module development.
    • [--outDir] (optional): change the outDir name default dist

Why ?

Why you ask? The goal was to make nuxi cli feel like it has all the tool sets needed for nuxt πŸ’š . I do feel like it would be nice to see even the nuxt-module-builder inside nuxi so it's easier to maintain code.

Maybe there are few improvements to make but I can leave this as a draft PR to see what you say.

Thanks!

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Sep 16, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 7b8936e
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/6324a718927e1b0009dd1bfd

@cpreston321 cpreston321 changed the title feat(nuxi): move module-builder to unified nuxicli feat(nuxi): move module-builder to unified nuxi cli Sep 16, 2022
@pi0
Copy link
Member

pi0 commented Sep 16, 2022

Hi @cpreston321 and thanks for the PR. I do share the same idea that nuxi CLI should magically support building modules.

Since we have external dependencies (unbuild), it would add to boilerplate of modules and we have to make sure modules use a supported version of this dependency. We might also add more dependencies over time to the module-builder stack that makes it beyond unbuild. This is the primary reason I decided to keep it separated.

We do however plan to support nuxi- subcommand. (https://github.com/nuxt/nuxt.js/issues/13634 and nuxt/module-builder#32). This way when module builder dependency is added, nuxi build-module will work out of the box.

Something we might do before introducing subcommand support, is to have a stub nuxi build-module command in nuxi that executes nuxt-build-module internally and if not found, makes an error to install the dependency of @nuxt/module-builder. Would you like to help on this? πŸ™πŸΌ

(I'm closing this PR because moving module-builder to the core is not planned at this point because of above reasons)

@pi0 pi0 closed this Sep 16, 2022
@cpreston321
Copy link
Contributor Author

@pi0 I would love to help! I appreciate the in detail response. I can work the stub in the mean-time.

Thanks πŸ’š

@cpreston321 cpreston321 mentioned this pull request Sep 16, 2022
7 tasks
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants