{"action":"closed","issue":{"url":"https://api.github.com/repos/chrisdickinson/clone-packages/issues/8","labels_url":"https://api.github.com/repos/chrisdickinson/clone-packages/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/chrisdickinson/clone-packages/issues/8/comments","events_url":"https://api.github.com/repos/chrisdickinson/clone-packages/issues/8/events","html_url":"https://github.com/chrisdickinson/clone-packages/issues/8","id":51562518,"number":8,"title":"The example in the doc doesn't work","user":{"login":"Skywalker13","id":397862,"avatar_url":"https://avatars.githubusercontent.com/u/397862?v=3","gravatar_id":"","url":"https://api.github.com/users/Skywalker13","html_url":"https://github.com/Skywalker13","followers_url":"https://api.github.com/users/Skywalker13/followers","following_url":"https://api.github.com/users/Skywalker13/following{/other_user}","gists_url":"https://api.github.com/users/Skywalker13/gists{/gist_id}","starred_url":"https://api.github.com/users/Skywalker13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skywalker13/subscriptions","organizations_url":"https://api.github.com/users/Skywalker13/orgs","repos_url":"https://api.github.com/users/Skywalker13/repos","events_url":"https://api.github.com/users/Skywalker13/events{/privacy}","received_events_url":"https://api.github.com/users/Skywalker13/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-10T14:15:27Z","updated_at":"2015-02-27T06:31:08Z","closed_at":"2015-02-27T06:31:08Z","body":"In the doc:\r\n\r\n```javascript\r\nclone.all('jsl@1.1.0', 'http://registry.npmjs.org/', 'http://my.reg/', function(err) {\r\n\r\n})\r\n```\r\n\r\nBut it's wrong, because the first argument must be the *clone* itself.\r\nthe 5th argument must be the credentials\r\nthe 6th argument must be *xform* ???\r\nand then the callback\r\n\r\nIn the sources:\r\n\r\nindex.js\r\n```javascript\r\nmodule.exports.all = inner.cloneAll\r\n```\r\n\r\nclone-all.js\r\n```javascript\r\nfunction cloneAll(clone, pkg, src, dst, credentials, xform, ready) {\r\n  return clone(\r\n      pkg\r\n    , src\r\n    , dst\r\n    , credentials\r\n    , recursive(clone, src, dst, credentials)\r\n    , ready\r\n  )\r\n}\r\n```\r\n\r\nThen I've tried with something like:\r\n```javascript\r\nvar def = {\r\n    name: npmPackage,\r\n    version: deps[npmPackage]\r\n};\r\nclone.all(clone, def, from, dest, null, null, function (err) {\r\n    callback (err);\r\n});\r\n```\r\n\r\nIt's works better but it enters in an infinite loop... I've not investigate but I think that is a problem of circular dep. When it \"hangs\", the node process leaks memory. .. it should be reported in an other issue ...\r\n\r\n\r\nRegards"}}