alexanderGugel / ied

:package: Like npm, but faster - an alternative package manager for Node
http://alexandergugel.github.io/ied
MIT License
1.99k stars 53 forks source link

--save-dev also copy "dependencies" into "devDependencies" #12

Closed zhuangya closed 8 years ago

zhuangya commented 8 years ago

for ied repo it self:

16:57:34 nos:~/Documents/Projects/ied 9 (master u=)
~> ied install --save-dev debug
16:57:51 nos:~/Documents/Projects/ied 9 (master * u=)
~> gd
diff --git a/package.json b/package.json
index fa0aa17..507a5b7 100644
--- a/package.json
+++ b/package.json
@@ -19,11 +19,22 @@
     "tar-fs": "^1.8.1"
   },
   "devDependencies": {
-    "mocha": "^2.3.3",
+    "mocha": "^2.3.4",
     "mock-fs": "^3.4.0",
-    "mockmock": "0.0.5",
+    "mockmock": "^0.0.5",
     "proxyquire": "^1.7.3",
-    "standard": "^5.3.1"
+    "standard": "^5.3.1",
+    "archy": "^1.0.0",
+    "async": "^1.5.0",
+    "easy-table": "^1.0.0",
+    "gunzip-maybe": "^1.2.1",
+    "init-package-json": "^1.9.1",
+    "minimist": "^1.2.0",
+    "mkdirp": "^0.5.1",
+    "node-uuid": "^1.4.7",
+    "object-assign": "^3.0.0",
+    "semver": "^5.0.3",
+    "tar-fs": "^1.8.1"
   },
   "scripts": {
     "test": "mocha && standard",
@@ -44,4 +55,4 @@
     "example": "example",
     "test": "test"
   }
-}
+}
\ No newline at end of file
zhuangya commented 8 years ago

i only expected to save debug of coures

alexanderGugel commented 8 years ago

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

etc.

Confusing cases:

etc.

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

zhuangya commented 8 years ago

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

sebinsua commented 8 years ago

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

mstade commented 8 years ago

It's confusing that option order should matter, most reasonably friendly CLI tooling doesn't require this. These cases should be interchangeable:

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.

alexanderGugel commented 8 years ago

This has been fixed.