{"action":"created","issue":{"url":"https://api.github.com/repos/hakimel/Ladda/issues/47","labels_url":"https://api.github.com/repos/hakimel/Ladda/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/hakimel/Ladda/issues/47/comments","events_url":"https://api.github.com/repos/hakimel/Ladda/issues/47/events","html_url":"https://github.com/hakimel/Ladda/pull/47","id":52811104,"number":47,"title":"Add 'main' field in package.json for easier CommonJS loading","user":{"login":"ThibWeb","id":877585,"avatar_url":"https://avatars.githubusercontent.com/u/877585?v=3","gravatar_id":"","url":"https://api.github.com/users/ThibWeb","html_url":"https://github.com/ThibWeb","followers_url":"https://api.github.com/users/ThibWeb/followers","following_url":"https://api.github.com/users/ThibWeb/following{/other_user}","gists_url":"https://api.github.com/users/ThibWeb/gists{/gist_id}","starred_url":"https://api.github.com/users/ThibWeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThibWeb/subscriptions","organizations_url":"https://api.github.com/users/ThibWeb/orgs","repos_url":"https://api.github.com/users/ThibWeb/repos","events_url":"https://api.github.com/users/ThibWeb/events{/privacy}","received_events_url":"https://api.github.com/users/ThibWeb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-24T10:38:43Z","updated_at":"2015-03-23T17:11:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hakimel/Ladda/pulls/47","html_url":"https://github.com/hakimel/Ladda/pull/47","diff_url":"https://github.com/hakimel/Ladda/pull/47.diff","patch_url":"https://github.com/hakimel/Ladda/pull/47.patch"},"body":"Hi there,\r\n\r\nfor CommonJS / Browserify users, it is way easier to `require` modules by their name, rather than by a path. I just added the `main` field to the project's package.json to achieve this ([browserify documentation](https://github.com/substack/node-browserify#packagejson)), and also updated the example in the README.\r\n\r\nBTW if you do not want to merge this PR, the current CommonJS example does not work because the path needs to be prefixed by `./` (`var ladda = require('./Ladda/dist/ladda.min');`)."},"comment":{"url":"https://api.github.com/repos/hakimel/Ladda/issues/comments/85100355","html_url":"https://github.com/hakimel/Ladda/pull/47#issuecomment-85100355","issue_url":"https://api.github.com/repos/hakimel/Ladda/issues/47","id":85100355,"user":{"login":"smazurov","id":21636,"avatar_url":"https://avatars.githubusercontent.com/u/21636?v=3","gravatar_id":"","url":"https://api.github.com/users/smazurov","html_url":"https://github.com/smazurov","followers_url":"https://api.github.com/users/smazurov/followers","following_url":"https://api.github.com/users/smazurov/following{/other_user}","gists_url":"https://api.github.com/users/smazurov/gists{/gist_id}","starred_url":"https://api.github.com/users/smazurov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smazurov/subscriptions","organizations_url":"https://api.github.com/users/smazurov/orgs","repos_url":"https://api.github.com/users/smazurov/repos","events_url":"https://api.github.com/users/smazurov/events{/privacy}","received_events_url":"https://api.github.com/users/smazurov/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T17:11:39Z","updated_at":"2015-03-23T17:11:39Z","body":":+1: would love to get this fix merged."}}