Coder Social home page Coder Social logo

Comments (6)

zhuangya avatar zhuangya commented on June 17, 2024

i only expected to save debug of coures

from ied.

alexanderGugel avatar alexanderGugel commented on June 17, 2024

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-package
  • ied 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 installed

etc.

To put it in a nutshell the order matters. ied install debug --save-dev does what you would expect.

from ied.

zhuangya avatar zhuangya commented on June 17, 2024

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

from ied.

sebinsua avatar sebinsua commented on June 17, 2024

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 npms 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).

from ied.

mstade avatar mstade commented on June 17, 2024

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.

from ied.

alexanderGugel avatar alexanderGugel commented on June 17, 2024

This has been fixed.

from ied.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.