Closed zhuangya closed 8 years ago
i only expected to save debug
of coures
Yeah, had a look into it. This is actually not a bug, but more or less the intended behaviour, which might be confusing.... and I'm open to changes here..
ied install
installs all dependencies and devDependencies from package.json
ied install some-package
installs only some-packageied install some-package --save
installs only some-package and saves it under dependencies
ied install some-package --save-dev
installs only some-package and saves it under devDependencies
ied install --save
installs all dependencies and devDependencies from package.json
and saves them under dependencies
ied install --save-dev
installs all dependencies and devDependencies from package.json
and saves them under devDependencies
etc.
Confusing cases:
ied install --save-dev some-package
installs all dependencies and devDependencies from package.json
and saves them under devDependencies
, some-package
is being ignored and is not being installedetc.
To put it in a nutshell the order matters. ied install debug --save-dev
does what you would expect.
To put it in a nutshell the order matters. ied install debug --save-dev does what you would expect.
maybe the option order should matter, or should not
but can you write this in document?
it's pretty confusing to many people i think
To put it in a nutshell the order matters.
ied install debug --save-dev
does what you would expect.
Can we make the behaviour of the basic commands as similar to npm
s behaviour as possible?
If you need a rationalisation, mine is that ied [command] [--modifier] [subject(s)]
makes it more obvious that the modifier (e.g. --save-dev
) is upon the command (e.g. install
). Basically, it should be this way for the same reason you don't ied [subject(s)] [command]
(e.g. ied debug install
).
It's confusing that option order should matter, most reasonably friendly CLI tooling doesn't require this. These cases should be interchangeable:
ied install --save foo
ied install foo --save
The --save
option is "tied" to the install
command, not the argument foo
. At least, that's how I'm used to thinking about the UX of CLI tooling.
This has been fixed.
for ied repo it self: