{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/7440","labels_url":"https://api.github.com/repos/npm/npm/issues/7440/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/7440/comments","events_url":"https://api.github.com/repos/npm/npm/issues/7440/events","html_url":"https://github.com/npm/npm/issues/7440","id":58738525,"number":7440,"title":"Documentation bug in `npm run-script`","user":{"login":"smikes","id":5124609,"avatar_url":"https://avatars.githubusercontent.com/u/5124609?v=3","gravatar_id":"","url":"https://api.github.com/users/smikes","html_url":"https://github.com/smikes","followers_url":"https://api.github.com/users/smikes/followers","following_url":"https://api.github.com/users/smikes/following{/other_user}","gists_url":"https://api.github.com/users/smikes/gists{/gist_id}","starred_url":"https://api.github.com/users/smikes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smikes/subscriptions","organizations_url":"https://api.github.com/users/smikes/orgs","repos_url":"https://api.github.com/users/smikes/repos","events_url":"https://api.github.com/users/smikes/events{/privacy}","received_events_url":"https://api.github.com/users/smikes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/npm/npm/labels/bug","name":"bug","color":"C40233"},{"url":"https://api.github.com/repos/npm/npm/labels/documentation","name":"documentation","color":"d105f0"},{"url":"https://api.github.com/repos/npm/npm/labels/npm-exec","name":"npm-exec","color":"87A96B"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-24T13:33:36Z","updated_at":"2015-02-26T06:29:11Z","closed_at":"2015-02-26T06:29:11Z","body":"See <https://stackoverflow.com/questions/28690793/how-can-i-run-a-script-from-an-already-installed-npm-package>\r\n\r\nCurrent documentation:\r\n>DESCRIPTION\r\n     This  runs an arbitrary command from a package's \"scripts\" object.  If no package name is provided, it will search for a package.json in the current folder\r\n       and use its \"scripts\" object.\r\n\r\nCurrent code for run-script no longer supports the 4-argument version (`npm run-script <package> <script>`)\r\n\r\nSome possible approaches:\r\n1. fix doc bug by removing reference to package name\r\n\r\n2. restore `npm run <pkg> <script>` as alternative to `npm run <script>`  Downsides: probably creates problems with passing args to scripts, other `npm run` functionality\r\n\r\n3. alternatives?"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/76128965","html_url":"https://github.com/npm/npm/issues/7440#issuecomment-76128965","issue_url":"https://api.github.com/repos/npm/npm/issues/7440","id":76128965,"user":{"login":"othiym23","id":418097,"avatar_url":"https://avatars.githubusercontent.com/u/418097?v=3","gravatar_id":"","url":"https://api.github.com/users/othiym23","html_url":"https://github.com/othiym23","followers_url":"https://api.github.com/users/othiym23/followers","following_url":"https://api.github.com/users/othiym23/following{/other_user}","gists_url":"https://api.github.com/users/othiym23/gists{/gist_id}","starred_url":"https://api.github.com/users/othiym23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/othiym23/subscriptions","organizations_url":"https://api.github.com/users/othiym23/orgs","repos_url":"https://api.github.com/users/othiym23/repos","events_url":"https://api.github.com/users/othiym23/events{/privacy}","received_events_url":"https://api.github.com/users/othiym23/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T06:29:11Z","updated_at":"2015-02-26T06:29:11Z","body":"The wording in there was pretty confusing, so I reworked the whole thing and landed it as df1bbd9. The new behavior is the primary reason for the npm-semver bump, because we decided the new behavior was overall more useful than the old. I do think there's probably some scope to make `npm explore` slightly more generic, and I also think that this is yet another use case for `npm-exec`, should that ever come into existence. Either way, the proximate problem, the bad docs, have been fixed. Thanks for filing this, Sam!"}}