{"action":"created","issue":{"url":"https://api.github.com/repos/dangvanthanh/hyperapp-rollup/issues/1","repository_url":"https://api.github.com/repos/dangvanthanh/hyperapp-rollup","labels_url":"https://api.github.com/repos/dangvanthanh/hyperapp-rollup/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/dangvanthanh/hyperapp-rollup/issues/1/comments","events_url":"https://api.github.com/repos/dangvanthanh/hyperapp-rollup/issues/1/events","html_url":"https://github.com/dangvanthanh/hyperapp-rollup/issues/1","id":288694624,"node_id":"MDU6SXNzdWUyODg2OTQ2MjQ=","number":1,"title":"'async' problem","user":{"login":"algebraic-brain","id":434404,"node_id":"MDQ6VXNlcjQzNDQwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/434404?v=4","gravatar_id":"","url":"https://api.github.com/users/algebraic-brain","html_url":"https://github.com/algebraic-brain","followers_url":"https://api.github.com/users/algebraic-brain/followers","following_url":"https://api.github.com/users/algebraic-brain/following{/other_user}","gists_url":"https://api.github.com/users/algebraic-brain/gists{/gist_id}","starred_url":"https://api.github.com/users/algebraic-brain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algebraic-brain/subscriptions","organizations_url":"https://api.github.com/users/algebraic-brain/orgs","repos_url":"https://api.github.com/users/algebraic-brain/repos","events_url":"https://api.github.com/users/algebraic-brain/events{/privacy}","received_events_url":"https://api.github.com/users/algebraic-brain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dangvanthanh","id":2674850,"node_id":"MDQ6VXNlcjI2NzQ4NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/2674850?v=4","gravatar_id":"","url":"https://api.github.com/users/dangvanthanh","html_url":"https://github.com/dangvanthanh","followers_url":"https://api.github.com/users/dangvanthanh/followers","following_url":"https://api.github.com/users/dangvanthanh/following{/other_user}","gists_url":"https://api.github.com/users/dangvanthanh/gists{/gist_id}","starred_url":"https://api.github.com/users/dangvanthanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dangvanthanh/subscriptions","organizations_url":"https://api.github.com/users/dangvanthanh/orgs","repos_url":"https://api.github.com/users/dangvanthanh/repos","events_url":"https://api.github.com/users/dangvanthanh/events{/privacy}","received_events_url":"https://api.github.com/users/dangvanthanh/received_events","type":"User","site_admin":false},"assignees":[{"login":"dangvanthanh","id":2674850,"node_id":"MDQ6VXNlcjI2NzQ4NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/2674850?v=4","gravatar_id":"","url":"https://api.github.com/users/dangvanthanh","html_url":"https://github.com/dangvanthanh","followers_url":"https://api.github.com/users/dangvanthanh/followers","following_url":"https://api.github.com/users/dangvanthanh/following{/other_user}","gists_url":"https://api.github.com/users/dangvanthanh/gists{/gist_id}","starred_url":"https://api.github.com/users/dangvanthanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dangvanthanh/subscriptions","organizations_url":"https://api.github.com/users/dangvanthanh/orgs","repos_url":"https://api.github.com/users/dangvanthanh/repos","events_url":"https://api.github.com/users/dangvanthanh/events{/privacy}","received_events_url":"https://api.github.com/users/dangvanthanh/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-01-15T19:26:48Z","updated_at":"2018-06-12T15:20:17Z","closed_at":null,"author_association":"NONE","body":"Thanks a lot for this boilerplate.\r\n\r\nI used it with simplest hyperapp code:\r\n\r\n```javascript\r\nimport { h, app } from \"hyperapp\"\r\n\r\nconst state = {\r\n  count: 0\r\n}\r\n\r\nconst actions = {\r\n  down: () => state => ({ count: state.count - 1 }),\r\n  up: () => state => ({ count: state.count + 1 })\r\n}\r\n\r\nconst view = (state, actions) => (\r\n  <main>\r\n    <h1>{state.count}</h1>\r\n    <button onclick={actions.down}>-</button>\r\n    <button onclick={actions.up}>+</button>\r\n  </main>\r\n)\r\n\r\nconst main = app(state, actions, view, document.body)\r\n```\r\nAnd everything works just fine.\r\n\r\nBut I need this to be made `async` in order to add `await` calls inside:\r\n\r\n```javascript\r\nimport { h, app } from \"hyperapp\"\r\n\r\nasync function appEntry() {\r\n\r\n  const state = {\r\n    count: 0\r\n  }\r\n\r\n  const actions = {\r\n    down: () => state => ({ count: state.count - 1 }),\r\n    up: () => state => ({ count: state.count + 1 })\r\n  }\r\n\r\n  const view = (state, actions) => (\r\n    <main>\r\n      <h1>{state.count}</h1>\r\n      <button onclick={actions.down}>-</button>\r\n      <button onclick={actions.up}>+</button>\r\n    </main>\r\n  )\r\n\r\n  window.main = app(state, actions, view, document.body)\r\n}\r\n\r\nappEntry();\r\n```\r\n\r\nand now I have the following problem:\r\n\r\n```\r\n[!] (uglify plugin) Error: Error transforming bundle with 'uglify' plugin: Unexpected token: keyword (function)\r\n```\r\n\r\nThis error disappears when I remove `async` keyword. What I do wrong? Please help."},"comment":{"url":"https://api.github.com/repos/dangvanthanh/hyperapp-rollup/issues/comments/396628729","html_url":"https://github.com/dangvanthanh/hyperapp-rollup/issues/1#issuecomment-396628729","issue_url":"https://api.github.com/repos/dangvanthanh/hyperapp-rollup/issues/1","id":396628729,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjYyODcyOQ==","user":{"login":"dangvanthanh","id":2674850,"node_id":"MDQ6VXNlcjI2NzQ4NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/2674850?v=4","gravatar_id":"","url":"https://api.github.com/users/dangvanthanh","html_url":"https://github.com/dangvanthanh","followers_url":"https://api.github.com/users/dangvanthanh/followers","following_url":"https://api.github.com/users/dangvanthanh/following{/other_user}","gists_url":"https://api.github.com/users/dangvanthanh/gists{/gist_id}","starred_url":"https://api.github.com/users/dangvanthanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dangvanthanh/subscriptions","organizations_url":"https://api.github.com/users/dangvanthanh/orgs","repos_url":"https://api.github.com/users/dangvanthanh/repos","events_url":"https://api.github.com/users/dangvanthanh/events{/privacy}","received_events_url":"https://api.github.com/users/dangvanthanh/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T15:20:17Z","updated_at":"2018-06-12T15:20:17Z","author_association":"OWNER","body":"Thank you @algebraic-brain \r\n\r\nNow `hyperapp-rollup` support `async` keyword."}}
{"actor":{"display_login":"dangvanthanh"}}