payload: {"action":"created","comment":{"url":"https://api.github.com/repos/debitoor/nocms/pulls/comments/320706375","pull_request_review_id":283547277,"id":320706375,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyMDcwNjM3NQ==","diff_hunk":"@@ -1,20 +1,40 @@\n import renderDirectoryResourceCss from './renderDirectoryResourceCss';\n import renderDirectoryResourceHtml from './renderDirectoryResourceHtml';\n+import renderDirectoryResourceJs from './renderDirectoryResourceJs';\n import cssBingo from 'css-bingo';\n \n export default async function renderDirectoryResource(directoryResource, resources) {\n \ttry {\n-\t\tlet css = await renderDirectoryResourceCss(directoryResource);\n-\t\tlet html = await renderDirectoryResourceHtml(directoryResource, resources);\n-\t\tlet processedCss = cssBingo(css, html);\n-\t\tlet htmlWithPurifiedCssEmbedded = embedCssInHtml(processedCss, html);\n+\t\tconst css = await renderDirectoryResourceCss(directoryResource);\n+\t\tconst html = await renderDirectoryResourceHtml(directoryResource, resources);\n+\t\tconst processedCss = cssBingo(css, html);\n+\t\tlet htmlWithAssets = embedCssInHtml(processedCss, html);\n \n-\t\treturn htmlWithPurifiedCssEmbedded;\n+\t\ttry {\n+\t\t\tconst js = await renderDirectoryResourceJs(directoryResource);\n+\t\t\tif(js !== ''){\n+\t\t\t\thtmlWithAssets = embedJsInHtml(js, htmlWithAssets);\n+\t\t\t}\n+\t\t} catch(e) {\n+\t\t\tconsole.log('JS_ERROR');","path":"packages/nocms-plugin-directory-resources/src/renderDirectoryResource.js","position":24,"original_position":24,"commit_id":"0b174fcd938d5ad813b4128f4e9719579e7f8056","original_commit_id":"0b174fcd938d5ad813b4128f4e9719579e7f8056","user":{"login":"JonathanMH","id":919732,"node_id":"MDQ6VXNlcjkxOTczMg==","avatar_url":"https://avatars1.githubusercontent.com/u/919732?v=4","gravatar_id":"","url":"https://api.github.com/users/JonathanMH","html_url":"https://github.com/JonathanMH","followers_url":"https://api.github.com/users/JonathanMH/followers","following_url":"https://api.github.com/users/JonathanMH/following{/other_user}","gists_url":"https://api.github.com/users/JonathanMH/gists{/gist_id}","starred_url":"https://api.github.com/users/JonathanMH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonathanMH/subscriptions","organizations_url":"https://api.github.com/users/JonathanMH/orgs","repos_url":"https://api.github.com/users/JonathanMH/repos","events_url":"https://api.github.com/users/JonathanMH/events{/privacy}","received_events_url":"https://api.github.com/users/JonathanMH/received_events","type":"User","site_admin":false},"body":"I thought about that, but bundling errors are syntax errors in the frontend JS, which will otherwise be hidden when writing frontend code in general","created_at":"2019-09-04T11:26:32Z","updated_at":"2019-09-04T11:26:33Z","html_url":"https://github.com/debitoor/nocms/pull/20#discussion_r320706375","pull_request_url":"https://api.github.com/repos/debitoor/nocms/pulls/20","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/debitoor/nocms/pulls/comments/320706375"},"html":{"href":"https://github.com/debitoor/nocms/pull/20#discussion_r320706375"},"pull_request":{"href":"https://api.github.com/repos/debitoor/nocms/pulls/20"}},"in_reply_to_id":320705810},"pull_request":{"url":"https://api.github.com/repos/debitoor/nocms/pulls/20","id":230532174,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwNTMyMTc0","html_url":"https://github.com/debitoor/nocms/pull/20","diff_url":"https://github.com/debitoor/nocms/pull/20.diff","patch_url":"https://github.com/debitoor/nocms/pull/20.patch","issue_url":"https://api.github.com/repos/debitoor/nocms/issues/20","number":20,"state":"open","locked":false,"title":"adds js","user":{"login":"jonatanpedersen","id":1968180,"node_id":"MDQ6VXNlcjE5NjgxODA=","avatar_url":"https://avatars3.githubusercontent.com/u/1968180?v=4","gravatar_id":"","url":"https://api.github.com/users/jonatanpedersen","html_url":"https://github.com/jonatanpedersen","followers_url":"https://api.github.com/users/jonatanpedersen/followers","following_url":"https://api.github.com/users/jonatanpedersen/following{/other_user}","gists_url":"https://api.github.com/users/jonatanpedersen/gists{/gist_id}","starred_url":"https://api.github.com/users/jonatanpedersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonatanpedersen/subscriptions","organizations_url":"https://api.github.com/users/jonatanpedersen/orgs","repos_url":"https://api.github.com/users/jonatanpedersen/repos","events_url":"https://api.github.com/users/jonatanpedersen/events{/privacy}","received_events_url":"https://api.github.com/users/jonatanpedersen/received_events","type":"User","site_admin":false},"body":"Adds index.js rollup and embedding into html","created_at":"2018-11-13T16:03:41Z","updated_at":"2019-09-04T11:26:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7d5bad30e73696934c88a67a32e8b722fc3c5d3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/debitoor/nocms/pulls/20/commits","review_comments_url":"https://api.github.com/repos/debitoor/nocms/pulls/20/comments","review_comment_url":"https://api.github.com/repos/debitoor/nocms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/debitoor/nocms/issues/20/comments","statuses_url":"https://api.github.com/repos/debitoor/nocms/statuses/0b174fcd938d5ad813b4128f4e9719579e7f8056","head":{"label":"debitoor:js","ref":"js","sha":"0b174fcd938d5ad813b4128f4e9719579e7f8056","user":{"login":"debitoor","id":12413254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDEzMjU0","avatar_url":"https://avatars2.githubusercontent.com/u/12413254?v=4","gravatar_id":"","url":"https://api.github.com/users/debitoor","html_url":"https://github.com/debitoor","followers_url":"https://api.github.com/users/debitoor/followers","following_url":"https://api.github.com/users/debitoor/following{/other_user}","gists_url":"https://api.github.com/users/debitoor/gists{/gist_id}","starred_url":"https://api.github.com/users/debitoor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debitoor/subscriptions","organizations_url":"https://api.github.com/users/debitoor/orgs","repos_url":"https://api.github.com/users/debitoor/repos","events_url":"https://api.github.com/users/debitoor/events{/privacy}","received_events_url":"https://api.github.com/users/debitoor/received_events","type":"Organization","site_admin":false},"repo":{"id":79365651,"node_id":"MDEwOlJlcG9zaXRvcnk3OTM2NTY1MQ==","name":"nocms","full_name":"debitoor/nocms","private":false,"owner":{"login":"debitoor","id":12413254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDEzMjU0","avatar_url":"https://avatars2.githubusercontent.com/u/12413254?v=4","gravatar_id":"","url":"https://api.github.com/users/debitoor","html_url":"https://github.com/debitoor","followers_url":"https://api.github.com/users/debitoor/followers","following_url":"https://api.github.com/users/debitoor/following{/other_user}","gists_url":"https://api.github.com/users/debitoor/gists{/gist_id}","starred_url":"https://api.github.com/users/debitoor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debitoor/subscriptions","organizations_url":"https://api.github.com/users/debitoor/orgs","repos_url":"https://api.github.com/users/debitoor/repos","events_url":"https://api.github.com/users/debitoor/events{/privacy}","received_events_url":"https://api.github.com/users/debitoor/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/debitoor/nocms","description":"\"NO, You don't need a CMS\"","fork":false,"url":"https://api.github.com/repos/debitoor/nocms","forks_url":"https://api.github.com/repos/debitoor/nocms/forks","keys_url":"https://api.github.com/repos/debitoor/nocms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/debitoor/nocms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/debitoor/nocms/teams","hooks_url":"https://api.github.com/repos/debitoor/nocms/hooks","issue_events_url":"https://api.github.com/repos/debitoor/nocms/issues/events{/number}","events_url":"https://api.github.com/repos/debitoor/nocms/events","assignees_url":"https://api.github.com/repos/debitoor/nocms/assignees{/user}","branches_url":"https://api.github.com/repos/debitoor/nocms/branches{/branch}","tags_url":"https://api.github.com/repos/debitoor/nocms/tags","blobs_url":"https://api.github.com/repos/debitoor/nocms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/debitoor/nocms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/debitoor/nocms/git/refs{/sha}","trees_url":"https://api.github.com/repos/debitoor/nocms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/debitoor/nocms/statuses/{sha}","languages_url":"https://api.github.com/repos/debitoor/nocms/languages","stargazers_url":"https://api.github.com/repos/debitoor/nocms/stargazers","contributors_url":"https://api.github.com/repos/debitoor/nocms/contributors","subscribers_url":"https://api.github.com/repos/debitoor/nocms/subscribers","subscription_url":"https://api.github.com/repos/debitoor/nocms/subscription","commits_url":"https://api.github.com/repos/debitoor/nocms/commits{/sha}","git_commits_url":"https://api.github.com/repos/debitoor/nocms/git/commits{/sha}","comments_url":"https://api.github.com/repos/debitoor/nocms/comments{/number}","issue_comment_url":"https://api.github.com/repos/debitoor/nocms/issues/comments{/number}","contents_url":"https://api.github.com/repos/debitoor/nocms/contents/{+path}","compare_url":"https://api.github.com/repos/debitoor/nocms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/debitoor/nocms/merges","archive_url":"https://api.github.com/repos/debitoor/nocms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/debitoor/nocms/downloads","issues_url":"https://api.github.com/repos/debitoor/nocms/issues{/number}","pulls_url":"https://api.github.com/repos/debitoor/nocms/pulls{/number}","milestones_url":"https://api.github.com/repos/debitoor/nocms/milestones{/number}","notifications_url":"https://api.github.com/repos/debitoor/nocms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/debitoor/nocms/labels{/name}","releases_url":"https://api.github.com/repos/debitoor/nocms/releases{/id}","deployments_url":"https://api.github.com/repos/debitoor/nocms/deployments","created_at":"2017-01-18T17:34:30Z","updated_at":"2019-06-12T11:00:07Z","pushed_at":"2019-09-04T11:16:24Z","git_url":"git://github.com/debitoor/nocms.git","ssh_url":"git@github.com:debitoor/nocms.git","clone_url":"https://github.com/debitoor/nocms.git","svn_url":"https://github.com/debitoor/nocms","homepage":"https://www.npmjs.com/package/nocms","size":571,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":5,"license":null,"forks":0,"open_issues":5,"watchers":14,"default_branch":"master"}},"base":{"label":"debitoor:master","ref":"master","sha":"ad73d4b484851317f7369939eebf166d4fde2ac3","user":{"login":"debitoor","id":12413254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDEzMjU0","avatar_url":"https://avatars2.githubusercontent.com/u/12413254?v=4","gravatar_id":"","url":"https://api.github.com/users/debitoor","html_url":"https://github.com/debitoor","followers_url":"https://api.github.com/users/debitoor/followers","following_url":"https://api.github.com/users/debitoor/following{/other_user}","gists_url":"https://api.github.com/users/debitoor/gists{/gist_id}","starred_url":"https://api.github.com/users/debitoor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debitoor/subscriptions","organizations_url":"https://api.github.com/users/debitoor/orgs","repos_url":"https://api.github.com/users/debitoor/repos","events_url":"https://api.github.com/users/debitoor/events{/privacy}","received_events_url":"https://api.github.com/users/debitoor/received_events","type":"Organization","site_admin":false},"repo":{"id":79365651,"node_id":"MDEwOlJlcG9zaXRvcnk3OTM2NTY1MQ==","name":"nocms","full_name":"debitoor/nocms","private":false,"owner":{"login":"debitoor","id":12413254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDEzMjU0","avatar_url":"https://avatars2.githubusercontent.com/u/12413254?v=4","gravatar_id":"","url":"https://api.github.com/users/debitoor","html_url":"https://github.com/debitoor","followers_url":"https://api.github.com/users/debitoor/followers","following_url":"https://api.github.com/users/debitoor/following{/other_user}","gists_url":"https://api.github.com/users/debitoor/gists{/gist_id}","starred_url":"https://api.github.com/users/debitoor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debitoor/subscriptions","organizations_url":"https://api.github.com/users/debitoor/orgs","repos_url":"https://api.github.com/users/debitoor/repos","events_url":"https://api.github.com/users/debitoor/events{/privacy}","received_events_url":"https://api.github.com/users/debitoor/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/debitoor/nocms","description":"\"NO, You don't need a CMS\"","fork":false,"url":"https://api.github.com/repos/debitoor/nocms","forks_url":"https://api.github.com/repos/debitoor/nocms/forks","keys_url":"https://api.github.com/repos/debitoor/nocms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/debitoor/nocms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/debitoor/nocms/teams","hooks_url":"https://api.github.com/repos/debitoor/nocms/hooks","issue_events_url":"https://api.github.com/repos/debitoor/nocms/issues/events{/number}","events_url":"https://api.github.com/repos/debitoor/nocms/events","assignees_url":"https://api.github.com/repos/debitoor/nocms/assignees{/user}","branches_url":"https://api.github.com/repos/debitoor/nocms/branches{/branch}","tags_url":"https://api.github.com/repos/debitoor/nocms/tags","blobs_url":"https://api.github.com/repos/debitoor/nocms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/debitoor/nocms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/debitoor/nocms/git/refs{/sha}","trees_url":"https://api.github.com/repos/debitoor/nocms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/debitoor/nocms/statuses/{sha}","languages_url":"https://api.github.com/repos/debitoor/nocms/languages","stargazers_url":"https://api.github.com/repos/debitoor/nocms/stargazers","contributors_url":"https://api.github.com/repos/debitoor/nocms/contributors","subscribers_url":"https://api.github.com/repos/debitoor/nocms/subscribers","subscription_url":"https://api.github.com/repos/debitoor/nocms/subscription","commits_url":"https://api.github.com/repos/debitoor/nocms/commits{/sha}","git_commits_url":"https://api.github.com/repos/debitoor/nocms/git/commits{/sha}","comments_url":"https://api.github.com/repos/debitoor/nocms/comments{/number}","issue_comment_url":"https://api.github.com/repos/debitoor/nocms/issues/comments{/number}","contents_url":"https://api.github.com/repos/debitoor/nocms/contents/{+path}","compare_url":"https://api.github.com/repos/debitoor/nocms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/debitoor/nocms/merges","archive_url":"https://api.github.com/repos/debitoor/nocms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/debitoor/nocms/downloads","issues_url":"https://api.github.com/repos/debitoor/nocms/issues{/number}","pulls_url":"https://api.github.com/repos/debitoor/nocms/pulls{/number}","milestones_url":"https://api.github.com/repos/debitoor/nocms/milestones{/number}","notifications_url":"https://api.github.com/repos/debitoor/nocms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/debitoor/nocms/labels{/name}","releases_url":"https://api.github.com/repos/debitoor/nocms/releases{/id}","deployments_url":"https://api.github.com/repos/debitoor/nocms/deployments","created_at":"2017-01-18T17:34:30Z","updated_at":"2019-06-12T11:00:07Z","pushed_at":"2019-09-04T11:16:24Z","git_url":"git://github.com/debitoor/nocms.git","ssh_url":"git@github.com:debitoor/nocms.git","clone_url":"https://github.com/debitoor/nocms.git","svn_url":"https://github.com/debitoor/nocms","homepage":"https://www.npmjs.com/package/nocms","size":571,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":5,"license":null,"forks":0,"open_issues":5,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/debitoor/nocms/pulls/20"},"html":{"href":"https://github.com/debitoor/nocms/pull/20"},"issue":{"href":"https://api.github.com/repos/debitoor/nocms/issues/20"},"comments":{"href":"https://api.github.com/repos/debitoor/nocms/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/debitoor/nocms/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/debitoor/nocms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/debitoor/nocms/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/debitoor/nocms/statuses/0b174fcd938d5ad813b4128f4e9719579e7f8056"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"JonathanMH"}}