{"action":"created","comment":{"url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/comments/91333219","pull_request_review_id":11841249,"id":91333219,"diff_hunk":"@@ -26,6 +26,8 @@\n   },\n   \"dependencies\": {\n     \"chalk\": \"^1.1.3\",\n-    \"minimist\": \"^1.2.0\"\n+    \"htmltojsx\": \"git://github.com/harrison/react-magic.git\",","path":"package.json","position":5,"original_position":5,"commit_id":"751c31a861fb1c35a8aa1f100f651c20ab79b165","original_commit_id":"751c31a861fb1c35a8aa1f100f651c20ab79b165","user":{"login":"goopscoop","id":11171347,"avatar_url":"https://avatars.githubusercontent.com/u/11171347?v=3","gravatar_id":"","url":"https://api.github.com/users/goopscoop","html_url":"https://github.com/goopscoop","followers_url":"https://api.github.com/users/goopscoop/followers","following_url":"https://api.github.com/users/goopscoop/following{/other_user}","gists_url":"https://api.github.com/users/goopscoop/gists{/gist_id}","starred_url":"https://api.github.com/users/goopscoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goopscoop/subscriptions","organizations_url":"https://api.github.com/users/goopscoop/orgs","repos_url":"https://api.github.com/users/goopscoop/repos","events_url":"https://api.github.com/users/goopscoop/events{/privacy}","received_events_url":"https://api.github.com/users/goopscoop/received_events","type":"User","site_admin":false},"body":"Also, I don't see where any of these packages are being imported and used. Maybe I'm missing something. ","created_at":"2016-12-07T16:41:02Z","updated_at":"2016-12-07T16:41:02Z","html_url":"https://github.com/goopscoop/svg-to-react-cli/pull/9#discussion_r91333219","pull_request_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/comments/91333219"},"html":{"href":"https://github.com/goopscoop/svg-to-react-cli/pull/9#discussion_r91333219"},"pull_request":{"href":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/9","id":96760790,"html_url":"https://github.com/goopscoop/svg-to-react-cli/pull/9","diff_url":"https://github.com/goopscoop/svg-to-react-cli/pull/9.diff","patch_url":"https://github.com/goopscoop/svg-to-react-cli/pull/9.patch","issue_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/issues/9","number":9,"state":"open","locked":false,"title":"Using react magic's htmltojsx to do the heavy lifting of svg -> jsx.","user":{"login":"cjke","id":884065,"avatar_url":"https://avatars.githubusercontent.com/u/884065?v=3","gravatar_id":"","url":"https://api.github.com/users/cjke","html_url":"https://github.com/cjke","followers_url":"https://api.github.com/users/cjke/followers","following_url":"https://api.github.com/users/cjke/following{/other_user}","gists_url":"https://api.github.com/users/cjke/gists{/gist_id}","starred_url":"https://api.github.com/users/cjke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjke/subscriptions","organizations_url":"https://api.github.com/users/cjke/orgs","repos_url":"https://api.github.com/users/cjke/repos","events_url":"https://api.github.com/users/cjke/events{/privacy}","received_events_url":"https://api.github.com/users/cjke/received_events","type":"User","site_admin":false},"body":"A few notes:\r\n - separated out a few function files. This should make adding testing easier\r\n - separated out a language file. This should make it easier to add multiple languages (if thats a thing), also keeps all \"content\"-ish stuff in one spot\r\n - swapped minimist for yargs as better support for dashed booleans\r\n - generateComponent - the split/join line is to keep indenting consistent when using template strings\r\n - removeStyle function - htmltojsx comes with jsdom, so using jsdom to manipulate attributes (instead of manually parsing the DOM - which would have been tricky, esp with single v double quotes, etc)\r\n - jsDOM is also used to add width/height attributes back in (if not already present). The only catch, as noted by the comments is jsdom and htmltojsx will attempt to quote any attributes - so a minimal amount of regex is used to strip the quotes (this is the only direct DOM manipulation done now, which means easier to maintain (imo)).\r\n\r\nTested on n4.6.","created_at":"2016-12-06T16:44:30Z","updated_at":"2016-12-07T16:42:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47e3e83cca139d38129edfb817330bf5108b0150","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/9/commits","review_comments_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/9/comments","review_comment_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/issues/9/comments","statuses_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/statuses/751c31a861fb1c35a8aa1f100f651c20ab79b165","head":{"label":"cjke:leverage-htmltojsx","ref":"leverage-htmltojsx","sha":"751c31a861fb1c35a8aa1f100f651c20ab79b165","user":{"login":"cjke","id":884065,"avatar_url":"https://avatars.githubusercontent.com/u/884065?v=3","gravatar_id":"","url":"https://api.github.com/users/cjke","html_url":"https://github.com/cjke","followers_url":"https://api.github.com/users/cjke/followers","following_url":"https://api.github.com/users/cjke/following{/other_user}","gists_url":"https://api.github.com/users/cjke/gists{/gist_id}","starred_url":"https://api.github.com/users/cjke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjke/subscriptions","organizations_url":"https://api.github.com/users/cjke/orgs","repos_url":"https://api.github.com/users/cjke/repos","events_url":"https://api.github.com/users/cjke/events{/privacy}","received_events_url":"https://api.github.com/users/cjke/received_events","type":"User","site_admin":false},"repo":{"id":74200723,"name":"svg-to-react-cli","full_name":"cjke/svg-to-react-cli","owner":{"login":"cjke","id":884065,"avatar_url":"https://avatars.githubusercontent.com/u/884065?v=3","gravatar_id":"","url":"https://api.github.com/users/cjke","html_url":"https://github.com/cjke","followers_url":"https://api.github.com/users/cjke/followers","following_url":"https://api.github.com/users/cjke/following{/other_user}","gists_url":"https://api.github.com/users/cjke/gists{/gist_id}","starred_url":"https://api.github.com/users/cjke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjke/subscriptions","organizations_url":"https://api.github.com/users/cjke/orgs","repos_url":"https://api.github.com/users/cjke/repos","events_url":"https://api.github.com/users/cjke/events{/privacy}","received_events_url":"https://api.github.com/users/cjke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cjke/svg-to-react-cli","description":"A command line utility that takes a svg image file and outputs a fully formatted stateless functional React component file that can be used to render your image.","fork":true,"url":"https://api.github.com/repos/cjke/svg-to-react-cli","forks_url":"https://api.github.com/repos/cjke/svg-to-react-cli/forks","keys_url":"https://api.github.com/repos/cjke/svg-to-react-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cjke/svg-to-react-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cjke/svg-to-react-cli/teams","hooks_url":"https://api.github.com/repos/cjke/svg-to-react-cli/hooks","issue_events_url":"https://api.github.com/repos/cjke/svg-to-react-cli/issues/events{/number}","events_url":"https://api.github.com/repos/cjke/svg-to-react-cli/events","assignees_url":"https://api.github.com/repos/cjke/svg-to-react-cli/assignees{/user}","branches_url":"https://api.github.com/repos/cjke/svg-to-react-cli/branches{/branch}","tags_url":"https://api.github.com/repos/cjke/svg-to-react-cli/tags","blobs_url":"https://api.github.com/repos/cjke/svg-to-react-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cjke/svg-to-react-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cjke/svg-to-react-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/cjke/svg-to-react-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cjke/svg-to-react-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/cjke/svg-to-react-cli/languages","stargazers_url":"https://api.github.com/repos/cjke/svg-to-react-cli/stargazers","contributors_url":"https://api.github.com/repos/cjke/svg-to-react-cli/contributors","subscribers_url":"https://api.github.com/repos/cjke/svg-to-react-cli/subscribers","subscription_url":"https://api.github.com/repos/cjke/svg-to-react-cli/subscription","commits_url":"https://api.github.com/repos/cjke/svg-to-react-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/cjke/svg-to-react-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/cjke/svg-to-react-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/cjke/svg-to-react-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/cjke/svg-to-react-cli/contents/{+path}","compare_url":"https://api.github.com/repos/cjke/svg-to-react-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cjke/svg-to-react-cli/merges","archive_url":"https://api.github.com/repos/cjke/svg-to-react-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cjke/svg-to-react-cli/downloads","issues_url":"https://api.github.com/repos/cjke/svg-to-react-cli/issues{/number}","pulls_url":"https://api.github.com/repos/cjke/svg-to-react-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/cjke/svg-to-react-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/cjke/svg-to-react-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cjke/svg-to-react-cli/labels{/name}","releases_url":"https://api.github.com/repos/cjke/svg-to-react-cli/releases{/id}","deployments_url":"https://api.github.com/repos/cjke/svg-to-react-cli/deployments","created_at":"2016-11-19T10:01:51Z","updated_at":"2016-11-19T10:01:52Z","pushed_at":"2016-12-06T16:40:56Z","git_url":"git://github.com/cjke/svg-to-react-cli.git","ssh_url":"git@github.com:cjke/svg-to-react-cli.git","clone_url":"https://github.com/cjke/svg-to-react-cli.git","svn_url":"https://github.com/cjke/svg-to-react-cli","homepage":null,"size":35,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"goopscoop:master","ref":"master","sha":"1fa7dd8551197e9aa49e00f0f3f3ee86098b15cb","user":{"login":"goopscoop","id":11171347,"avatar_url":"https://avatars.githubusercontent.com/u/11171347?v=3","gravatar_id":"","url":"https://api.github.com/users/goopscoop","html_url":"https://github.com/goopscoop","followers_url":"https://api.github.com/users/goopscoop/followers","following_url":"https://api.github.com/users/goopscoop/following{/other_user}","gists_url":"https://api.github.com/users/goopscoop/gists{/gist_id}","starred_url":"https://api.github.com/users/goopscoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goopscoop/subscriptions","organizations_url":"https://api.github.com/users/goopscoop/orgs","repos_url":"https://api.github.com/users/goopscoop/repos","events_url":"https://api.github.com/users/goopscoop/events{/privacy}","received_events_url":"https://api.github.com/users/goopscoop/received_events","type":"User","site_admin":false},"repo":{"id":72251044,"name":"svg-to-react-cli","full_name":"goopscoop/svg-to-react-cli","owner":{"login":"goopscoop","id":11171347,"avatar_url":"https://avatars.githubusercontent.com/u/11171347?v=3","gravatar_id":"","url":"https://api.github.com/users/goopscoop","html_url":"https://github.com/goopscoop","followers_url":"https://api.github.com/users/goopscoop/followers","following_url":"https://api.github.com/users/goopscoop/following{/other_user}","gists_url":"https://api.github.com/users/goopscoop/gists{/gist_id}","starred_url":"https://api.github.com/users/goopscoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goopscoop/subscriptions","organizations_url":"https://api.github.com/users/goopscoop/orgs","repos_url":"https://api.github.com/users/goopscoop/repos","events_url":"https://api.github.com/users/goopscoop/events{/privacy}","received_events_url":"https://api.github.com/users/goopscoop/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/goopscoop/svg-to-react-cli","description":"A command line utility that takes a svg image file and outputs a fully formatted stateless functional React component file that can be used to render your image.","fork":false,"url":"https://api.github.com/repos/goopscoop/svg-to-react-cli","forks_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/forks","keys_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/teams","hooks_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/hooks","issue_events_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/issues/events{/number}","events_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/events","assignees_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/assignees{/user}","branches_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/branches{/branch}","tags_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/tags","blobs_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/languages","stargazers_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/stargazers","contributors_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/contributors","subscribers_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/subscribers","subscription_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/subscription","commits_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/contents/{+path}","compare_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/merges","archive_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/downloads","issues_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/issues{/number}","pulls_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/labels{/name}","releases_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/releases{/id}","deployments_url":"https://api.github.com/repos/goopscoop/svg-to-react-cli/deployments","created_at":"2016-10-28T23:39:31Z","updated_at":"2016-11-18T17:48:50Z","pushed_at":"2016-12-06T16:44:30Z","git_url":"git://github.com/goopscoop/svg-to-react-cli.git","ssh_url":"git@github.com:goopscoop/svg-to-react-cli.git","clone_url":"https://github.com/goopscoop/svg-to-react-cli.git","svn_url":"https://github.com/goopscoop/svg-to-react-cli","homepage":null,"size":26,"stargazers_count":30,"watchers_count":30,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/9"},"html":{"href":"https://github.com/goopscoop/svg-to-react-cli/pull/9"},"issue":{"href":"https://api.github.com/repos/goopscoop/svg-to-react-cli/issues/9"},"comments":{"href":"https://api.github.com/repos/goopscoop/svg-to-react-cli/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/goopscoop/svg-to-react-cli/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/goopscoop/svg-to-react-cli/statuses/751c31a861fb1c35a8aa1f100f651c20ab79b165"}}}}
{"actor":{"display_login":"goopscoop"}}