antfu-collective / ni

💡 Use the right package manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ni should not assume I want to create new project always

severak opened this issue · comments

Clear and concise description of the problem

We have some legacy projects in work where package.json does not live in project root but in some subdirectory (usually something like src/FrontBundle/Resources/public).

The problem is that when I go to some where there is no package.json file ni assumes I want to create new project.

Suggested solution

It should ask me something like "There is not project detected in this directory. Do you want to start a new one?" and then proceed to ask me which package manager I want to use.

Alternative

No response

Additional context

No response

Validations

There is not project detected in this directory. Do you want to start a new one?

If I choose no ? what will happen ?

If I choose no ? what will happen ?

It should end itself and let me walk into right directory.

Or maybe look into parent directory and and ask me if I want execute it from that directory (as composer install does in php land).

If I choose no ? what will happen ?

It should end itself and let me walk into right directory.

Or maybe look into parent directory and and ask me if I want execute it from that directory (as composer install does in php land).

Got it, I believe this makes sense