{"action":"created","issue":{"url":"https://api.github.com/repos/LeaVerou/bliss/issues/107","labels_url":"https://api.github.com/repos/LeaVerou/bliss/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/LeaVerou/bliss/issues/107/comments","events_url":"https://api.github.com/repos/LeaVerou/bliss/issues/107/events","html_url":"https://github.com/LeaVerou/bliss/issues/107","id":122095035,"number":107,"title":"Modify exports for use with commonjs/es6 modules","user":{"login":"tracker1","id":444316,"avatar_url":"https://avatars.githubusercontent.com/u/444316?v=3","gravatar_id":"","url":"https://api.github.com/users/tracker1","html_url":"https://github.com/tracker1","followers_url":"https://api.github.com/users/tracker1/followers","following_url":"https://api.github.com/users/tracker1/following{/other_user}","gists_url":"https://api.github.com/users/tracker1/gists{/gist_id}","starred_url":"https://api.github.com/users/tracker1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tracker1/subscriptions","organizations_url":"https://api.github.com/users/tracker1/orgs","repos_url":"https://api.github.com/users/tracker1/repos","events_url":"https://api.github.com/users/tracker1/events{/privacy}","received_events_url":"https://api.github.com/users/tracker1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/LeaVerou/bliss/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-14T17:52:53Z","updated_at":"2015-12-24T18:19:52Z","closed_at":null,"body":"It would be nice if you exported (test for module/module.exports as well as self) then exports against $, $$ so that they can be imported directly...\r\n\r\n```js\r\n(function (context){\r\n  context.$ = $;\r\n  context.$$ = $.$;\r\n}(\r\n  typeof module !== 'undefined' && module.exports \r\n  || typeof self !== 'undefined' && self || this)\r\n);\r\n```\r\n\r\nThis way it can be used via cjs modules built via browserify/webpack or via es6 imports via babel as such.\r\n\r\n```\r\nimport {$,$$} from 'blissfuljs';\r\n```\r\n\r\nAlternatively, if `module.exports` exists, `module.exports = Bliss` and assume \"shy\" mode."},"comment":{"url":"https://api.github.com/repos/LeaVerou/bliss/issues/comments/167145120","html_url":"https://github.com/LeaVerou/bliss/issues/107#issuecomment-167145120","issue_url":"https://api.github.com/repos/LeaVerou/bliss/issues/107","id":167145120,"user":{"login":"oriSomething","id":2685242,"avatar_url":"https://avatars.githubusercontent.com/u/2685242?v=3","gravatar_id":"","url":"https://api.github.com/users/oriSomething","html_url":"https://github.com/oriSomething","followers_url":"https://api.github.com/users/oriSomething/followers","following_url":"https://api.github.com/users/oriSomething/following{/other_user}","gists_url":"https://api.github.com/users/oriSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/oriSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oriSomething/subscriptions","organizations_url":"https://api.github.com/users/oriSomething/orgs","repos_url":"https://api.github.com/users/oriSomething/repos","events_url":"https://api.github.com/users/oriSomething/events{/privacy}","received_events_url":"https://api.github.com/users/oriSomething/received_events","type":"User","site_admin":false},"created_at":"2015-12-24T18:19:52Z","updated_at":"2015-12-24T18:19:52Z","body":"i think, that actually rollup might be a better tool for packaging it:\r\n- because the compact syntax would be cleaner, more compact and much closer to the current source\r\n- browserify / webpack tends to leave fingerprints because the way it work\r\n"}}