nuxt / cli

⚡️ Nuxt Generation CLI Experience.
https://github.com/nuxt/cli/discussions/3
MIT License
267 stars 65 forks source link

Allow selecting package manager when creating new project with Nuxi #63

Closed DamianGlowala closed 1 year ago

DamianGlowala commented 1 year ago

Describe the feature

Currently, Nuxi creates a README.md file with package manager commands that are inconsistent (yarn, npm and pnpm commands vs npm-only in the last two sections). Providing all three variants for the below four stages might be a little bit verbose.

Nuxt 3 Minimal Starter

Look at the Nuxt 3 documentation to learn more.

Setup

Make sure to install the dependencies:

# yarn
yarn install

# npm
npm install

# pnpm
pnpm install

Development Server

Start the development server on http://localhost:3000

npm run dev

Production

Build the application for production:

npm run build

Locally preview production build:

npm run preview

Check out the deployment documentation for more information.

I really like how one of the backend frameworks, NestJS, provides a nicer DX by prompting a user to select the package manager and installing dependencies for the user:

image

This would allow Nuxi to tweak commands in README.md file according to the chosen package manager, as well as display more accurate messages in the CLI. "Install dependencies with (...)" could be removed and "Start development server with (...)" shortened:

image

Additional information

Final checks

pi0 commented 1 year ago

This is done by #38. Thanks for contributing and idea 💯