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

feat(nuxi): Entity management shortcuts #3915

Closed
wants to merge 9 commits into from

Conversation

Diizzayy
Copy link
Member

@Diizzayy Diizzayy commented Mar 26, 2022

As outlined in nuxt/nuxt.js#13550 by @pi0 @Atinux. This POC draft is our first step in introducing Entity management shortcuts to the Nuxi CLI.

Entity Shortcuts are meant to provide a simple yet robust way to quickly manage projects via CLI in this first stage. This functionality will later be leveraged by API Routes (ex: /__nuxi/<entity>/<command>) and Nuxt Devtools to allow for project management directly from the browser.

Nuxt is heavily dependent on proper filesystem structure, hence this PR aims to bridge to the gap making it easier for both newcomers as well as veterans of Nuxt to minimize the time it takes it scan and manage projects.

Upon arrival of a proper unjs templating util, we'll be able to begin full scale extension of this functionality

Initial implementation is as follows (Though the possibilities are vast):

nuxi <entity> <command> <name?>

nuxi modules show
nuxi modules add @unocss/nuxt
nuxi composables new useProfile
nuxi pages new "articles/[slug]"

the show command is meant to display an overview of the filesystem structure for the given entity. We also explored the possibility of using a --resolve-all flag for leveraging a nuxt3 instance to get a fully resolved list of all the entities which may be extended by modules (pages, plugins, composables, middlewares, etc...), Though we've decided for now (performance in mind) that the full resolution would be a better fit for Nuxt Devtools.

Any ideas or suggestions are welcome!

Todo:

  • Initial Functionality
  • Refactor code @pi0
  • Update Documentation

  • πŸ“– 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)

πŸ“ Checklist

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

@netlify
Copy link

netlify bot commented Mar 26, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 456dc1d
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/63552e97b04fae0008cafb30

@pi0 pi0 marked this pull request as draft March 26, 2022 08:55
@Intevel Intevel mentioned this pull request Mar 31, 2022
7 tasks
@pi0 pi0 added enhancement New feature or request cli labels Apr 5, 2022
@pi0 pi0 force-pushed the main branch 2 times, most recently from 247e18b to c98e5c7 Compare September 14, 2022 10:41
@pi0
Copy link
Member

pi0 commented Nov 16, 2022

Hi dear @Diizzayy. Thanks again for working on this POC. Since we still lack CLI infra and module management has to be implemented separately, i think we should come up with new implementation and also replan nuxt/nuxt.js#13550. I will keep you posted about updated via insiders beforehand πŸ‘πŸΌ

@pi0 pi0 closed this Nov 16, 2022
@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
3.x cli enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants