{"action":"created","issue":{"url":"https://api.github.com/repos/yavorsky/riot-brunch/issues/11","repository_url":"https://api.github.com/repos/yavorsky/riot-brunch","labels_url":"https://api.github.com/repos/yavorsky/riot-brunch/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/yavorsky/riot-brunch/issues/11/comments","events_url":"https://api.github.com/repos/yavorsky/riot-brunch/issues/11/events","html_url":"https://github.com/yavorsky/riot-brunch/pull/11","id":158051253,"number":11,"title":"require and export in CommonJS style","user":{"login":"robbiewxyz","id":7308014,"avatar_url":"https://avatars.githubusercontent.com/u/7308014?v=3","gravatar_id":"","url":"https://api.github.com/users/robbiewxyz","html_url":"https://github.com/robbiewxyz","followers_url":"https://api.github.com/users/robbiewxyz/followers","following_url":"https://api.github.com/users/robbiewxyz/following{/other_user}","gists_url":"https://api.github.com/users/robbiewxyz/gists{/gist_id}","starred_url":"https://api.github.com/users/robbiewxyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbiewxyz/subscriptions","organizations_url":"https://api.github.com/users/robbiewxyz/orgs","repos_url":"https://api.github.com/users/robbiewxyz/repos","events_url":"https://api.github.com/users/robbiewxyz/events{/privacy}","received_events_url":"https://api.github.com/users/robbiewxyz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-02T03:15:27Z","updated_at":"2016-06-05T13:10:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yavorsky/riot-brunch/pulls/11","html_url":"https://github.com/yavorsky/riot-brunch/pull/11","diff_url":"https://github.com/yavorsky/riot-brunch/pull/11.diff","patch_url":"https://github.com/yavorsky/riot-brunch/pull/11.patch"},"body":"riot-brunch assumes that we have the `riot` global available, meaning I have to add `riot.js` as a vendor script.  This is unnecessary as we're downloading it from the NPM anyway and it can be included with a simple `require`.  This way also means polluting the global scope.\r\n\r\nThis change does things in what I feel is the \"CommonJS way\".  The code comes from https://github.com/jhthorsen/riotify/blob/master/index.js#L16 .  We eliminate the vendor script and the global.\r\n\r\nHopefully this helps cut down on configuration clutter for everyone :grinning: ."},"comment":{"url":"https://api.github.com/repos/yavorsky/riot-brunch/issues/comments/223812279","html_url":"https://github.com/yavorsky/riot-brunch/pull/11#issuecomment-223812279","issue_url":"https://api.github.com/repos/yavorsky/riot-brunch/issues/11","id":223812279,"user":{"login":"yavorsky","id":1521229,"avatar_url":"https://avatars.githubusercontent.com/u/1521229?v=3","gravatar_id":"","url":"https://api.github.com/users/yavorsky","html_url":"https://github.com/yavorsky","followers_url":"https://api.github.com/users/yavorsky/followers","following_url":"https://api.github.com/users/yavorsky/following{/other_user}","gists_url":"https://api.github.com/users/yavorsky/gists{/gist_id}","starred_url":"https://api.github.com/users/yavorsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yavorsky/subscriptions","organizations_url":"https://api.github.com/users/yavorsky/orgs","repos_url":"https://api.github.com/users/yavorsky/repos","events_url":"https://api.github.com/users/yavorsky/events{/privacy}","received_events_url":"https://api.github.com/users/yavorsky/received_events","type":"User","site_admin":false},"created_at":"2016-06-05T13:10:35Z","updated_at":"2016-06-05T13:10:35Z","body":"@robbiewxyz Thanks for your interest! But modules and riot scope is a brunch part. Plugins is just compilers. \r\n\r\nYou can specify riot as dependency in `package.json` and then get access using `var riot = require('riot');` in any of your modules. Moreover, you can use:\r\n\r\n```javascript\r\nnpm: { globals: {\r\n  riot: \"riot\"\r\n}}\r\n```\r\nin your [brunch config](http://brunch.io/docs/config). \r\n\r\nIf you are using riot from separate vendor file, brunch docs says: \r\n`All files from vendor directory are by default concatenated before all files from app directory`"}}
{"actor":{"display_login":"yavorsky"}}