{"action":"created","issue":{"url":"https://api.github.com/repos/dantheman629/FlexibleSurvival-2.0/issues/20","labels_url":"https://api.github.com/repos/dantheman629/FlexibleSurvival-2.0/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/dantheman629/FlexibleSurvival-2.0/issues/20/comments","events_url":"https://api.github.com/repos/dantheman629/FlexibleSurvival-2.0/issues/20/events","html_url":"https://github.com/dantheman629/FlexibleSurvival-2.0/issues/20","id":67239606,"number":20,"title":"Javascript modules using browserify","user":{"login":"futafutafuta","id":11861753,"avatar_url":"https://avatars.githubusercontent.com/u/11861753?v=3","gravatar_id":"","url":"https://api.github.com/users/futafutafuta","html_url":"https://github.com/futafutafuta","followers_url":"https://api.github.com/users/futafutafuta/followers","following_url":"https://api.github.com/users/futafutafuta/following{/other_user}","gists_url":"https://api.github.com/users/futafutafuta/gists{/gist_id}","starred_url":"https://api.github.com/users/futafutafuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futafutafuta/subscriptions","organizations_url":"https://api.github.com/users/futafutafuta/orgs","repos_url":"https://api.github.com/users/futafutafuta/repos","events_url":"https://api.github.com/users/futafutafuta/events{/privacy}","received_events_url":"https://api.github.com/users/futafutafuta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-08T23:07:26Z","updated_at":"2015-04-09T13:20:23Z","closed_at":null,"body":"Hey, just a quick suggestion you may or may not find useful.\r\n\r\nI often use [browerify](http://browserify.org/) in combination with [npm](https://www.npmjs.com/) for my client side javascript. ([Grunt](http://gruntjs.com/) is also great for any compilation steps you may need)\r\n\r\nUsing browserify, each javascript file (module) will have its own scope. Any variable you would like to expose will have to be explictly exported: `module.exports.foo = 'bar'`. Other modules will have to include your module using require: `require('./path/to/module.js').foo`.\r\nBrowserify does this by combining all your modules into a single bundle file (chrome & firefox will show the original line numbers if you enable source maps).\r\n\r\nThere are also a lot of modules on npm that you can use with browserify, for example jquery is on there _(not that I actually like jquery ;p)_. This also avoids having to commit libraries in the git repo, a single command `npm install` will install all the dependencies you need."},"comment":{"url":"https://api.github.com/repos/dantheman629/FlexibleSurvival-2.0/issues/comments/91229623","html_url":"https://github.com/dantheman629/FlexibleSurvival-2.0/issues/20#issuecomment-91229623","issue_url":"https://api.github.com/repos/dantheman629/FlexibleSurvival-2.0/issues/20","id":91229623,"user":{"login":"dantheman629","id":11598416,"avatar_url":"https://avatars.githubusercontent.com/u/11598416?v=3","gravatar_id":"","url":"https://api.github.com/users/dantheman629","html_url":"https://github.com/dantheman629","followers_url":"https://api.github.com/users/dantheman629/followers","following_url":"https://api.github.com/users/dantheman629/following{/other_user}","gists_url":"https://api.github.com/users/dantheman629/gists{/gist_id}","starred_url":"https://api.github.com/users/dantheman629/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantheman629/subscriptions","organizations_url":"https://api.github.com/users/dantheman629/orgs","repos_url":"https://api.github.com/users/dantheman629/repos","events_url":"https://api.github.com/users/dantheman629/events{/privacy}","received_events_url":"https://api.github.com/users/dantheman629/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T13:20:23Z","updated_at":"2015-04-09T13:20:23Z","body":"I'll take a look at it.  Unfortunatley this project has become weekend\nonly, and my list right now is pretty full.  I'll get around to that\neventaully though, thank you for the suggestion.\n\n\nOn Wed, Apr 8, 2015 at 7:07 PM, futafutafuta <notifications@github.com>\nwrote:\n\n> Hey, just a quick suggestion you may or may not find useful.\n>\n> I often use browerify <http://browserify.org/> in combination with npm\n> <https://www.npmjs.com/> for my client side javascript. (Grunt\n> <http://gruntjs.com/> is also great for any compilation steps you may\n> need)\n>\n> Using browserify, each javascript file (module) will have its own scope.\n> Any variable you would like to expose will have to be explictly exported: module.exports.foo\n> = 'bar'. Other modules will have to include your module using require:\n> require('./path/to/module.js').foo.\n> Browserify does this by combining all your modules into a single bundle\n> file (chrome & firefox will show the original line numbers if you enable\n> source maps).\n>\n> There are also a lot of modules on npm that you can use with browserify,\n> for example jquery is on there *(not that I actually like jquery ;p)*.\n> This also avoids having to commit libraries in the git repo, a single\n> command npm install will install all the dependencies you need.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/dantheman629/FlexibleSurvival-2.0/issues/20>.\n>\n"}}