Detecting if cwd doesn't contain a Nuxt project
Default behavior for using the CLI in a directory without nuxt.config.ts is installing, then creating the Nuxt config file and adding the module. Can we check if nuxt.config.ts exists first ?
Thinking behavior should be either showing a YES/NO question to create it and proceed? Or, just killing the process.
@pi0 Happy to do the PR. :)
Certainly! PR more than welcome to add this guard. I think we need to check either of pages/ dir, nuxt.config or app.vue files exist. (to avoid edge cases, we might show a consola.prompt and ask hey this seems not a valid dir, do you really want to continue?)
I think it should be one rule checking if it's Nuxt project or not (searching for config file) and to be added to the add/module commands.