nuxt / cli

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

use project name for package.json name in init Command #421

Open arashsheyda opened 4 months ago

arashsheyda commented 4 months ago

Description

When running the command npx nuxi@latest init <project-name>, the package.json's name is always initialized with nuxt-app I am aware that we are fetching the files from the templates but do you think that would be possible to make it dynamic to match the <project-name>?

usecase

This enhancement would improve consistency and streamline the initialization process for new Nuxt projects specially in monorepo projects I'd say.

Eckhardt-D commented 4 months ago

To add to this, it would also fix an error when initializing multiple Nuxt projects in e.g. Bun Monorepo.

If, for example, you initialize a Nuxt project in packages/base (with the intention of extending it) and don't manually change the name property in package.json, if you initialize another project in apps/myapp the dependency install will fail.