{"action":"created","comment":{"url":"https://api.github.com/repos/sindresorhus/np/pulls/comments/48852407","id":48852407,"diff_hunk":"@@ -17,8 +17,11 @@ fi\n \n trashCli=$(node -e \"var path = require('path');console.log(path.join(path.dirname(require('fs').realpathSync('$0')), 'node_modules/.bin/trash'))\");\n \n-node \"$trashCli\" node_modules &&\n-npm install &&\n+if test \"$2\" = '--keep'; then","path":"np.sh","position":6,"original_position":6,"commit_id":"8ed71516ca5e1b6a78782f1bad6807b08383f447","original_commit_id":"a61e049b7a48d3622191f6de74ddca033e10cd46","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"body":"This looks wrong. Isn't this deleting the node modules only when the `--keep` flag is passed?","created_at":"2016-01-05T14:59:35Z","updated_at":"2016-01-05T14:59:35Z","html_url":"https://github.com/sindresorhus/np/pull/11#discussion_r48852407","pull_request_url":"https://api.github.com/repos/sindresorhus/np/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/np/pulls/comments/48852407"},"html":{"href":"https://github.com/sindresorhus/np/pull/11#discussion_r48852407"},"pull_request":{"href":"https://api.github.com/repos/sindresorhus/np/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/sindresorhus/np/pulls/11","id":55020361,"html_url":"https://github.com/sindresorhus/np/pull/11","diff_url":"https://github.com/sindresorhus/np/pull/11.diff","patch_url":"https://github.com/sindresorhus/np/pull/11.patch","issue_url":"https://api.github.com/repos/sindresorhus/np/issues/11","number":11,"state":"open","locked":false,"title":"Add \"--keep\" flag to preserve node_modules.","user":{"login":"jamen","id":6251703,"avatar_url":"https://avatars.githubusercontent.com/u/6251703?v=3","gravatar_id":"","url":"https://api.github.com/users/jamen","html_url":"https://github.com/jamen","followers_url":"https://api.github.com/users/jamen/followers","following_url":"https://api.github.com/users/jamen/following{/other_user}","gists_url":"https://api.github.com/users/jamen/gists{/gist_id}","starred_url":"https://api.github.com/users/jamen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamen/subscriptions","organizations_url":"https://api.github.com/users/jamen/orgs","repos_url":"https://api.github.com/users/jamen/repos","events_url":"https://api.github.com/users/jamen/events{/privacy}","received_events_url":"https://api.github.com/users/jamen/received_events","type":"User","site_admin":false},"body":"Makes it so you can use `np --keep` to stop it from deleting your `node_modules`.\r\n\r\nFixes #10 ","created_at":"2016-01-04T20:50:04Z","updated_at":"2016-01-05T14:59:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27d4149ac554b766fd830f7707c918b3d7b2dfe1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/np/pulls/11/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/np/pulls/11/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/np/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/np/issues/11/comments","statuses_url":"https://api.github.com/repos/sindresorhus/np/statuses/8ed71516ca5e1b6a78782f1bad6807b08383f447","head":{"label":"jamen:master","ref":"master","sha":"8ed71516ca5e1b6a78782f1bad6807b08383f447","user":{"login":"jamen","id":6251703,"avatar_url":"https://avatars.githubusercontent.com/u/6251703?v=3","gravatar_id":"","url":"https://api.github.com/users/jamen","html_url":"https://github.com/jamen","followers_url":"https://api.github.com/users/jamen/followers","following_url":"https://api.github.com/users/jamen/following{/other_user}","gists_url":"https://api.github.com/users/jamen/gists{/gist_id}","starred_url":"https://api.github.com/users/jamen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamen/subscriptions","organizations_url":"https://api.github.com/users/jamen/orgs","repos_url":"https://api.github.com/users/jamen/repos","events_url":"https://api.github.com/users/jamen/events{/privacy}","received_events_url":"https://api.github.com/users/jamen/received_events","type":"User","site_admin":false},"repo":null},"base":{"label":"sindresorhus:master","ref":"master","sha":"d6a221c7e41fc77a9d1bc24d7425c8b85058a888","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"repo":{"id":40806530,"name":"np","full_name":"sindresorhus/np","owner":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sindresorhus/np","description":"A better `npm publish`","fork":false,"url":"https://api.github.com/repos/sindresorhus/np","forks_url":"https://api.github.com/repos/sindresorhus/np/forks","keys_url":"https://api.github.com/repos/sindresorhus/np/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/np/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/np/teams","hooks_url":"https://api.github.com/repos/sindresorhus/np/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/np/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/np/events","assignees_url":"https://api.github.com/repos/sindresorhus/np/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/np/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/np/tags","blobs_url":"https://api.github.com/repos/sindresorhus/np/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/np/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/np/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/np/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/np/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/np/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/np/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/np/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/np/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/np/subscription","commits_url":"https://api.github.com/repos/sindresorhus/np/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/np/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/np/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/np/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/np/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/np/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/np/merges","archive_url":"https://api.github.com/repos/sindresorhus/np/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/np/downloads","issues_url":"https://api.github.com/repos/sindresorhus/np/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/np/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/np/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/np/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/np/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/np/releases{/id}","created_at":"2015-08-16T09:06:06Z","updated_at":"2016-01-04T13:48:35Z","pushed_at":"2016-01-04T21:46:26Z","git_url":"git://github.com/sindresorhus/np.git","ssh_url":"git@github.com:sindresorhus/np.git","clone_url":"https://github.com/sindresorhus/np.git","svn_url":"https://github.com/sindresorhus/np","homepage":null,"size":11,"stargazers_count":112,"watchers_count":112,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":112,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/np/pulls/11"},"html":{"href":"https://github.com/sindresorhus/np/pull/11"},"issue":{"href":"https://api.github.com/repos/sindresorhus/np/issues/11"},"comments":{"href":"https://api.github.com/repos/sindresorhus/np/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/np/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/np/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/np/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/np/statuses/8ed71516ca5e1b6a78782f1bad6807b08383f447"}}}}