Run bun add -d <pkg>
to move an existing dep to devDependencies
#5714
Labels
bun add -d <pkg>
to move an existing dep to devDependencies
#5714
What is the problem this feature would solve?
It's common to forget the
-d
flag when installing a package.It'd be nice to simply run
bun add -d <pkg>
to move it into devDependecies, like npm does. But Bun requires removing the package and adding it again using the desired flag.What is the feature you are proposing to solve the problem?
If a package is already installed as a non-dev dependency, running
bun add -d <pkg>
would move it in package.json into devDependencies.What alternatives have you considered?
bun remove <pkg> && bun add -d <pkg>
The text was updated successfully, but these errors were encountered: