{"action":"created","issue":{"url":"https://api.github.com/repos/mikaelbr/node-notifier/issues/139","repository_url":"https://api.github.com/repos/mikaelbr/node-notifier","labels_url":"https://api.github.com/repos/mikaelbr/node-notifier/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/mikaelbr/node-notifier/issues/139/comments","events_url":"https://api.github.com/repos/mikaelbr/node-notifier/issues/139/events","html_url":"https://github.com/mikaelbr/node-notifier/issues/139","id":175860472,"number":139,"title":"Update Lib to support ES Modules","user":{"login":"kurisubrooks","id":6291467,"avatar_url":"https://avatars.githubusercontent.com/u/6291467?v=3","gravatar_id":"","url":"https://api.github.com/users/kurisubrooks","html_url":"https://github.com/kurisubrooks","followers_url":"https://api.github.com/users/kurisubrooks/followers","following_url":"https://api.github.com/users/kurisubrooks/following{/other_user}","gists_url":"https://api.github.com/users/kurisubrooks/gists{/gist_id}","starred_url":"https://api.github.com/users/kurisubrooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurisubrooks/subscriptions","organizations_url":"https://api.github.com/users/kurisubrooks/orgs","repos_url":"https://api.github.com/users/kurisubrooks/repos","events_url":"https://api.github.com/users/kurisubrooks/events{/privacy}","received_events_url":"https://api.github.com/users/kurisubrooks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mikaelbr/node-notifier/labels/Breaking","name":"Breaking","color":"e11d21"},{"url":"https://api.github.com/repos/mikaelbr/node-notifier/labels/Enhancement","name":"Enhancement","color":"009800"},{"url":"https://api.github.com/repos/mikaelbr/node-notifier/labels/ES6","name":"ES6","color":"0e8a16"}],"state":"closed","locked":false,"assignee":{"login":"mikaelbr","id":606374,"avatar_url":"https://avatars.githubusercontent.com/u/606374?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaelbr","html_url":"https://github.com/mikaelbr","followers_url":"https://api.github.com/users/mikaelbr/followers","following_url":"https://api.github.com/users/mikaelbr/following{/other_user}","gists_url":"https://api.github.com/users/mikaelbr/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelbr/subscriptions","organizations_url":"https://api.github.com/users/mikaelbr/orgs","repos_url":"https://api.github.com/users/mikaelbr/repos","events_url":"https://api.github.com/users/mikaelbr/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelbr/received_events","type":"User","site_admin":false},"assignees":[{"login":"mikaelbr","id":606374,"avatar_url":"https://avatars.githubusercontent.com/u/606374?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaelbr","html_url":"https://github.com/mikaelbr","followers_url":"https://api.github.com/users/mikaelbr/followers","following_url":"https://api.github.com/users/mikaelbr/following{/other_user}","gists_url":"https://api.github.com/users/mikaelbr/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelbr/subscriptions","organizations_url":"https://api.github.com/users/mikaelbr/orgs","repos_url":"https://api.github.com/users/mikaelbr/repos","events_url":"https://api.github.com/users/mikaelbr/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelbr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-09-08T20:48:16Z","updated_at":"2016-09-17T14:44:48Z","closed_at":"2016-09-09T18:37:26Z","body":"Update the module to support ECMAScript 2016 Module syntax.\r\n\r\nExamples:\r\n`import * as notifier from \"node-notifier\"`\r\n`import NotificationCenter from \"node-notifier\"`\r\n`import { NotificationCenter, Toaster } from \"node-notifier\"`\r\n`import { NotificationCenter as mac, Toaster as windows } from \"node-notifier\"`\r\n\r\nReference:\r\nhttp://www.2ality.com/2014/09/es6-modules-final.html\r\nhttps://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/import"},"comment":{"url":"https://api.github.com/repos/mikaelbr/node-notifier/issues/comments/247776978","html_url":"https://github.com/mikaelbr/node-notifier/issues/139#issuecomment-247776978","issue_url":"https://api.github.com/repos/mikaelbr/node-notifier/issues/139","id":247776978,"user":{"login":"mikaelbr","id":606374,"avatar_url":"https://avatars.githubusercontent.com/u/606374?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaelbr","html_url":"https://github.com/mikaelbr","followers_url":"https://api.github.com/users/mikaelbr/followers","following_url":"https://api.github.com/users/mikaelbr/following{/other_user}","gists_url":"https://api.github.com/users/mikaelbr/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelbr/subscriptions","organizations_url":"https://api.github.com/users/mikaelbr/orgs","repos_url":"https://api.github.com/users/mikaelbr/repos","events_url":"https://api.github.com/users/mikaelbr/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelbr/received_events","type":"User","site_admin":false},"created_at":"2016-09-17T14:44:48Z","updated_at":"2016-09-17T14:44:48Z","body":"Sorry, didn't mean to sound aggressive in any way. 🐙 It is definitely something we can look into more in the future when the module loading strategies of Node has settled and there is a proper way to do it. But, there is also a way to do the same thing as of now:\r\n\r\nInstead of\r\n```js\r\nimport * as notifier from \"node-notifier\"\r\nimport NotificationCenter from \"node-notifier\"\r\nimport { NotificationCenter, Toaster } from \"node-notifier\"\r\nimport { NotificationCenter as mac, Toaster as windows } from \"node-notifier\"\r\n```\r\n\r\nOne can do\r\n\r\n```js\r\nconst notifier = require('node-notifier');\r\nconst { NotifySend } = require('node-notifier');\r\nconst { NotificationCenter, WindowsToaster } = require('node-notifier');\r\nconst { NotificationCenter: mac, WindowsToaster: windows } = require('node-notifier');\r\n```"}}
{"actor":{"display_login":"mikaelbr"}}