{"action":"created","comment":{"url":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/comments/62898517","id":62898517,"diff_hunk":"@@ -1,30 +1,27 @@\n #!/usr/bin/env node\n 'use strict';\n-const fs = require('fs');\n-const path = require('path');\n const arrify = require('arrify');\n const meow = require('meow');\n const getStdin = require('get-stdin');\n-const pathExists = require('path-exists');\n-const Imagemin = require('imagemin');\n+const imagemin = require('imagemin');\n+const stripIndent = require('strip-indent');\n \n const cli = meow(`\n \tUsage\n-\t  $ imagemin <file> <directory>\n-\t  $ imagemin <directory> <output>\n+\t  $ imagemin <path|glob> ... --out-dir build\n \t  $ imagemin <file> > <output>\n \t  $ cat <file> | imagemin > <output>\n \t  $ imagemin [--plugin <plugin-name>...] ...\n \n \tOptions\n+\t  -O, --optimizationLevel <number>  Optimization level between 0 and 7\n \t  -P, --plugin                      Override the default plugins\n \t  -i, --interlaced                  Interlace gif for progressive rendering\n-\t  -o, --optimizationLevel <number>  Optimization level between 0 and 7\n+\t  -o, --out-dir                     Output directory\n \t  -p, --progressive                 Lossless conversion to progressive","path":"cli.js","position":28,"original_position":28,"commit_id":"b61917c5e84de4498a9e6d9f50b46e14efc49fb0","original_commit_id":"b61917c5e84de4498a9e6d9f50b46e14efc49fb0","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":"I think we should do what we did in gulp-imagemin and drop all the plugin options here. We can rather introduce ability to supply plugin options directly to the plugins in another PR.","created_at":"2016-05-11T18:15:46Z","updated_at":"2016-05-11T18:15:46Z","html_url":"https://github.com/imagemin/imagemin-cli/pull/6#discussion_r62898517","pull_request_url":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/comments/62898517"},"html":{"href":"https://github.com/imagemin/imagemin-cli/pull/6#discussion_r62898517"},"pull_request":{"href":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/6","id":68399102,"html_url":"https://github.com/imagemin/imagemin-cli/pull/6","diff_url":"https://github.com/imagemin/imagemin-cli/pull/6.diff","patch_url":"https://github.com/imagemin/imagemin-cli/pull/6.patch","issue_url":"https://api.github.com/repos/imagemin/imagemin-cli/issues/6","number":6,"state":"open","locked":false,"title":"Bump imagemin version","user":{"login":"kevva","id":709159,"avatar_url":"https://avatars.githubusercontent.com/u/709159?v=3","gravatar_id":"","url":"https://api.github.com/users/kevva","html_url":"https://github.com/kevva","followers_url":"https://api.github.com/users/kevva/followers","following_url":"https://api.github.com/users/kevva/following{/other_user}","gists_url":"https://api.github.com/users/kevva/gists{/gist_id}","starred_url":"https://api.github.com/users/kevva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevva/subscriptions","organizations_url":"https://api.github.com/users/kevva/orgs","repos_url":"https://api.github.com/users/kevva/repos","events_url":"https://api.github.com/users/kevva/events{/privacy}","received_events_url":"https://api.github.com/users/kevva/received_events","type":"User","site_admin":false},"body":"This will also remove the functionality for automatically detecting directories since all it did was bloat the code imo. Also renamed the shorthand for `optimizationLevel` to `O` instead of `o` which is replaced by `outdir`. `O` is also pretty common among the binaries we're using.","created_at":"2016-04-29T16:35:16Z","updated_at":"2016-05-11T18:15:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96f5c7cb6ecd2c25803e66e45956ef21af49bafa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/6/commits","review_comments_url":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/6/comments","review_comment_url":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/imagemin/imagemin-cli/issues/6/comments","statuses_url":"https://api.github.com/repos/imagemin/imagemin-cli/statuses/b61917c5e84de4498a9e6d9f50b46e14efc49fb0","head":{"label":"imagemin:bump-imagemin","ref":"bump-imagemin","sha":"b61917c5e84de4498a9e6d9f50b46e14efc49fb0","user":{"login":"imagemin","id":7868808,"avatar_url":"https://avatars.githubusercontent.com/u/7868808?v=3","gravatar_id":"","url":"https://api.github.com/users/imagemin","html_url":"https://github.com/imagemin","followers_url":"https://api.github.com/users/imagemin/followers","following_url":"https://api.github.com/users/imagemin/following{/other_user}","gists_url":"https://api.github.com/users/imagemin/gists{/gist_id}","starred_url":"https://api.github.com/users/imagemin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imagemin/subscriptions","organizations_url":"https://api.github.com/users/imagemin/orgs","repos_url":"https://api.github.com/users/imagemin/repos","events_url":"https://api.github.com/users/imagemin/events{/privacy}","received_events_url":"https://api.github.com/users/imagemin/received_events","type":"Organization","site_admin":false},"repo":{"id":37809096,"name":"imagemin-cli","full_name":"imagemin/imagemin-cli","owner":{"login":"imagemin","id":7868808,"avatar_url":"https://avatars.githubusercontent.com/u/7868808?v=3","gravatar_id":"","url":"https://api.github.com/users/imagemin","html_url":"https://github.com/imagemin","followers_url":"https://api.github.com/users/imagemin/followers","following_url":"https://api.github.com/users/imagemin/following{/other_user}","gists_url":"https://api.github.com/users/imagemin/gists{/gist_id}","starred_url":"https://api.github.com/users/imagemin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imagemin/subscriptions","organizations_url":"https://api.github.com/users/imagemin/orgs","repos_url":"https://api.github.com/users/imagemin/repos","events_url":"https://api.github.com/users/imagemin/events{/privacy}","received_events_url":"https://api.github.com/users/imagemin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/imagemin/imagemin-cli","description":"Minify images","fork":false,"url":"https://api.github.com/repos/imagemin/imagemin-cli","forks_url":"https://api.github.com/repos/imagemin/imagemin-cli/forks","keys_url":"https://api.github.com/repos/imagemin/imagemin-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/imagemin/imagemin-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/imagemin/imagemin-cli/teams","hooks_url":"https://api.github.com/repos/imagemin/imagemin-cli/hooks","issue_events_url":"https://api.github.com/repos/imagemin/imagemin-cli/issues/events{/number}","events_url":"https://api.github.com/repos/imagemin/imagemin-cli/events","assignees_url":"https://api.github.com/repos/imagemin/imagemin-cli/assignees{/user}","branches_url":"https://api.github.com/repos/imagemin/imagemin-cli/branches{/branch}","tags_url":"https://api.github.com/repos/imagemin/imagemin-cli/tags","blobs_url":"https://api.github.com/repos/imagemin/imagemin-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/imagemin/imagemin-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/imagemin/imagemin-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/imagemin/imagemin-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/imagemin/imagemin-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/imagemin/imagemin-cli/languages","stargazers_url":"https://api.github.com/repos/imagemin/imagemin-cli/stargazers","contributors_url":"https://api.github.com/repos/imagemin/imagemin-cli/contributors","subscribers_url":"https://api.github.com/repos/imagemin/imagemin-cli/subscribers","subscription_url":"https://api.github.com/repos/imagemin/imagemin-cli/subscription","commits_url":"https://api.github.com/repos/imagemin/imagemin-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/imagemin/imagemin-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/imagemin/imagemin-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/imagemin/imagemin-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/imagemin/imagemin-cli/contents/{+path}","compare_url":"https://api.github.com/repos/imagemin/imagemin-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/imagemin/imagemin-cli/merges","archive_url":"https://api.github.com/repos/imagemin/imagemin-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/imagemin/imagemin-cli/downloads","issues_url":"https://api.github.com/repos/imagemin/imagemin-cli/issues{/number}","pulls_url":"https://api.github.com/repos/imagemin/imagemin-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/imagemin/imagemin-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/imagemin/imagemin-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/imagemin/imagemin-cli/labels{/name}","releases_url":"https://api.github.com/repos/imagemin/imagemin-cli/releases{/id}","deployments_url":"https://api.github.com/repos/imagemin/imagemin-cli/deployments","created_at":"2015-06-21T13:02:33Z","updated_at":"2016-05-06T19:07:13Z","pushed_at":"2016-05-11T18:02:52Z","git_url":"git://github.com/imagemin/imagemin-cli.git","ssh_url":"git@github.com:imagemin/imagemin-cli.git","clone_url":"https://github.com/imagemin/imagemin-cli.git","svn_url":"https://github.com/imagemin/imagemin-cli","homepage":null,"size":532,"stargazers_count":85,"watchers_count":85,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":85,"default_branch":"master"}},"base":{"label":"imagemin:master","ref":"master","sha":"2179988c820ebb6653fd1e86a50411ef54e6e7f8","user":{"login":"imagemin","id":7868808,"avatar_url":"https://avatars.githubusercontent.com/u/7868808?v=3","gravatar_id":"","url":"https://api.github.com/users/imagemin","html_url":"https://github.com/imagemin","followers_url":"https://api.github.com/users/imagemin/followers","following_url":"https://api.github.com/users/imagemin/following{/other_user}","gists_url":"https://api.github.com/users/imagemin/gists{/gist_id}","starred_url":"https://api.github.com/users/imagemin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imagemin/subscriptions","organizations_url":"https://api.github.com/users/imagemin/orgs","repos_url":"https://api.github.com/users/imagemin/repos","events_url":"https://api.github.com/users/imagemin/events{/privacy}","received_events_url":"https://api.github.com/users/imagemin/received_events","type":"Organization","site_admin":false},"repo":{"id":37809096,"name":"imagemin-cli","full_name":"imagemin/imagemin-cli","owner":{"login":"imagemin","id":7868808,"avatar_url":"https://avatars.githubusercontent.com/u/7868808?v=3","gravatar_id":"","url":"https://api.github.com/users/imagemin","html_url":"https://github.com/imagemin","followers_url":"https://api.github.com/users/imagemin/followers","following_url":"https://api.github.com/users/imagemin/following{/other_user}","gists_url":"https://api.github.com/users/imagemin/gists{/gist_id}","starred_url":"https://api.github.com/users/imagemin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imagemin/subscriptions","organizations_url":"https://api.github.com/users/imagemin/orgs","repos_url":"https://api.github.com/users/imagemin/repos","events_url":"https://api.github.com/users/imagemin/events{/privacy}","received_events_url":"https://api.github.com/users/imagemin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/imagemin/imagemin-cli","description":"Minify images","fork":false,"url":"https://api.github.com/repos/imagemin/imagemin-cli","forks_url":"https://api.github.com/repos/imagemin/imagemin-cli/forks","keys_url":"https://api.github.com/repos/imagemin/imagemin-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/imagemin/imagemin-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/imagemin/imagemin-cli/teams","hooks_url":"https://api.github.com/repos/imagemin/imagemin-cli/hooks","issue_events_url":"https://api.github.com/repos/imagemin/imagemin-cli/issues/events{/number}","events_url":"https://api.github.com/repos/imagemin/imagemin-cli/events","assignees_url":"https://api.github.com/repos/imagemin/imagemin-cli/assignees{/user}","branches_url":"https://api.github.com/repos/imagemin/imagemin-cli/branches{/branch}","tags_url":"https://api.github.com/repos/imagemin/imagemin-cli/tags","blobs_url":"https://api.github.com/repos/imagemin/imagemin-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/imagemin/imagemin-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/imagemin/imagemin-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/imagemin/imagemin-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/imagemin/imagemin-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/imagemin/imagemin-cli/languages","stargazers_url":"https://api.github.com/repos/imagemin/imagemin-cli/stargazers","contributors_url":"https://api.github.com/repos/imagemin/imagemin-cli/contributors","subscribers_url":"https://api.github.com/repos/imagemin/imagemin-cli/subscribers","subscription_url":"https://api.github.com/repos/imagemin/imagemin-cli/subscription","commits_url":"https://api.github.com/repos/imagemin/imagemin-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/imagemin/imagemin-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/imagemin/imagemin-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/imagemin/imagemin-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/imagemin/imagemin-cli/contents/{+path}","compare_url":"https://api.github.com/repos/imagemin/imagemin-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/imagemin/imagemin-cli/merges","archive_url":"https://api.github.com/repos/imagemin/imagemin-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/imagemin/imagemin-cli/downloads","issues_url":"https://api.github.com/repos/imagemin/imagemin-cli/issues{/number}","pulls_url":"https://api.github.com/repos/imagemin/imagemin-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/imagemin/imagemin-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/imagemin/imagemin-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/imagemin/imagemin-cli/labels{/name}","releases_url":"https://api.github.com/repos/imagemin/imagemin-cli/releases{/id}","deployments_url":"https://api.github.com/repos/imagemin/imagemin-cli/deployments","created_at":"2015-06-21T13:02:33Z","updated_at":"2016-05-06T19:07:13Z","pushed_at":"2016-05-11T18:02:52Z","git_url":"git://github.com/imagemin/imagemin-cli.git","ssh_url":"git@github.com:imagemin/imagemin-cli.git","clone_url":"https://github.com/imagemin/imagemin-cli.git","svn_url":"https://github.com/imagemin/imagemin-cli","homepage":null,"size":532,"stargazers_count":85,"watchers_count":85,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":85,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/6"},"html":{"href":"https://github.com/imagemin/imagemin-cli/pull/6"},"issue":{"href":"https://api.github.com/repos/imagemin/imagemin-cli/issues/6"},"comments":{"href":"https://api.github.com/repos/imagemin/imagemin-cli/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/imagemin/imagemin-cli/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/imagemin/imagemin-cli/statuses/b61917c5e84de4498a9e6d9f50b46e14efc49fb0"}}}}