{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/9952","labels_url":"https://api.github.com/repos/npm/npm/issues/9952/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/9952/comments","events_url":"https://api.github.com/repos/npm/npm/issues/9952/events","html_url":"https://github.com/npm/npm/issues/9952","id":111014076,"number":9952,"title":"Descriptions for NPM Scripts","user":{"login":"blainesch","id":769039,"avatar_url":"https://avatars.githubusercontent.com/u/769039?v=3","gravatar_id":"","url":"https://api.github.com/users/blainesch","html_url":"https://github.com/blainesch","followers_url":"https://api.github.com/users/blainesch/followers","following_url":"https://api.github.com/users/blainesch/following{/other_user}","gists_url":"https://api.github.com/users/blainesch/gists{/gist_id}","starred_url":"https://api.github.com/users/blainesch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blainesch/subscriptions","organizations_url":"https://api.github.com/users/blainesch/orgs","repos_url":"https://api.github.com/users/blainesch/repos","events_url":"https://api.github.com/users/blainesch/events{/privacy}","received_events_url":"https://api.github.com/users/blainesch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-12T16:49:43Z","updated_at":"2015-10-14T02:33:18Z","closed_at":null,"body":"It would be handy to add descriptions to NPM scripts. Having a list of commands using `npm run` is helpful, but only allows me to find the command I'm looking for specifically. Knowing what all exists could help me prune the list and make modifications to one instead of creating a new one.\r\n\r\nExample syntax:\r\n\r\n~~~\r\n\"scripts\": {\r\n  \"code-coverage\": {\r\n    \"cmd\": \"karma start --browsers Chrome --single-run\",\r\n    \"description\": \"Runs the tests without disabling code coverage utility.\"\r\n  }\r\n}\r\n~~~\r\n\r\nMaybe there is a better way to accomplish what I'm looking for? Either way, I'd be happy to pr if this is something the community wants.\r\n\r\n[Related lines of code](https://github.com/npm/npm/blob/master/lib/run-script.js#L62)"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/147906518","html_url":"https://github.com/npm/npm/issues/9952#issuecomment-147906518","issue_url":"https://api.github.com/repos/npm/npm/issues/9952","id":147906518,"user":{"login":"mike-engel","id":464447,"avatar_url":"https://avatars.githubusercontent.com/u/464447?v=3","gravatar_id":"","url":"https://api.github.com/users/mike-engel","html_url":"https://github.com/mike-engel","followers_url":"https://api.github.com/users/mike-engel/followers","following_url":"https://api.github.com/users/mike-engel/following{/other_user}","gists_url":"https://api.github.com/users/mike-engel/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-engel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-engel/subscriptions","organizations_url":"https://api.github.com/users/mike-engel/orgs","repos_url":"https://api.github.com/users/mike-engel/repos","events_url":"https://api.github.com/users/mike-engel/events{/privacy}","received_events_url":"https://api.github.com/users/mike-engel/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T02:33:18Z","updated_at":"2015-10-14T02:33:18Z","body":"@blainesch @scottaddie How do you both feel about this? There's a lot more added whitespace to make it more readable, so let me know if it's too much.\r\n\r\nMarkup:\r\n\r\n```json\r\n\"scripts\": {\r\n  \"dumpconf\": \"env | grep npm | sort | uniq\",\r\n  \"prepublish\": \"bash scripts/installable.sh && node bin/npm-cli.js prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc\",\r\n  \"preversion\": \"bash scripts/update-authors.sh && git add AUTHORS && git commit -m \\\"update AUTHORS\\\" || true\",\r\n  \"tap\": \"tap --timeout 240\",\r\n  \"test\": {\r\n    \"script\": \"standard && npm run test-tap\",\r\n    \"description\": \"Our required test suite to ensure great success.\"\r\n  },\r\n  \"test-all\": {\r\n    \"script\": \"standard && npm run test-legacy && npm run test-tap\",\r\n    \"description\": \"Run all of the tests against your changes and the rest of the npm cli codebase. This should be really long so it wraps\"\r\n  },\r\n  \"test-legacy\": \"node ./test/run.js\",\r\n  \"test-tap\": \"npm run tap -- \\\"test/tap/*.js\\\"\"\r\n}\r\n```\r\n\r\nBefore: \r\n\r\n```\r\nLifecycle scripts included in npm:\r\n  prepublish\r\n    bash scripts/installable.sh && node bin/npm-cli.js prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc\r\n  preversion\r\n    bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true\r\n\r\navailable via `npm run-script`:\r\n  dumpconf\r\n    env | grep npm | sort | uniq\r\n  tap\r\n    tap --timeout 240\r\n  test-legacy\r\n    node ./test/run.js\r\n  test-tap\r\n    npm run tap -- \"test/tap/*.js\"\r\n```\r\n\r\nAfter:\r\n\r\n```\r\nLifecycle scripts included in npm:\r\n  prepublish\r\n    `bash scripts/installable.sh && node bin/npm-cli.js prune --prefix=. --no-global && rimraf\r\n    test/*/*/node_modules && make -j4 doc`\r\n\r\n  preversion\r\n    `bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true`\r\n\r\n  test\r\n    `standard && npm run test-tap`\r\n\r\n    Our required test suite to ensure great success.\r\n\r\n\r\navailable via `npm run-script`:\r\n  dumpconf\r\n    `env | grep npm | sort | uniq`\r\n\r\n  tap\r\n    `tap --timeout 240`\r\n\r\n  test-all\r\n    `standard && npm run test-legacy && npm run test-tap`\r\n\r\n    Run all of the tests against your changes and the rest of the npm cli\r\n    codebase. This should be really long so it wraps\r\n\r\n  test-legacy\r\n    `node ./test/run.js`\r\n\r\n  test-tap\r\n    `npm run tap -- \"test/tap/*.js\"`\r\n```"}}