{"action":"created","issue":{"url":"https://api.github.com/repos/saebekassebil/teoria/issues/77","labels_url":"https://api.github.com/repos/saebekassebil/teoria/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/saebekassebil/teoria/issues/77/comments","events_url":"https://api.github.com/repos/saebekassebil/teoria/issues/77/events","html_url":"https://github.com/saebekassebil/teoria/pull/77","id":74713747,"number":77,"title":"Convert Teoria to a node module compatible library","user":{"login":"danigb","id":7457,"avatar_url":"https://avatars.githubusercontent.com/u/7457?v=3","gravatar_id":"","url":"https://api.github.com/users/danigb","html_url":"https://github.com/danigb","followers_url":"https://api.github.com/users/danigb/followers","following_url":"https://api.github.com/users/danigb/following{/other_user}","gists_url":"https://api.github.com/users/danigb/gists{/gist_id}","starred_url":"https://api.github.com/users/danigb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danigb/subscriptions","organizations_url":"https://api.github.com/users/danigb/orgs","repos_url":"https://api.github.com/users/danigb/repos","events_url":"https://api.github.com/users/danigb/events{/privacy}","received_events_url":"https://api.github.com/users/danigb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-09T16:59:49Z","updated_at":"2015-05-11T09:02:40Z","closed_at":"2015-05-11T09:02:40Z","pull_request":{"url":"https://api.github.com/repos/saebekassebil/teoria/pulls/77","html_url":"https://github.com/saebekassebil/teoria/pull/77","diff_url":"https://github.com/saebekassebil/teoria/pull/77.diff","patch_url":"https://github.com/saebekassebil/teoria/pull/77.patch"},"body":"Hello, thanks for your library! This is my first pull request, so be kind.\r\n\r\nWhat I did: split the code in valid node modules so you can require all the library `require('teoria')` or just some parts of it `require ('teoria/scale')`\r\n\r\nThe required files are vector.js and interval.js. Notes (note.js) depend of both. Scales (scale.js) and Chords (chord.js) depend on note.js. One caveat of this dependency line is that, by default, Note objects doesn't implement TeoriaNote.scale and TeoriaNote.chord. \r\n\r\nThere's a facade object (index.js) that implements those methods, so if you require the library using `require('teoria')` the API will be exactly the same as before. Also in the the dist file, TeoriaNote has exactly the same API as before.\r\n\r\nI modified the tests (and added some new) that works with the new module system. I've keep the original tests inside test-dist and run then against the distribution file to check the compatibility.\r\n\r\nAlso notice that the distribution file is now in the repo, so no need to build it. \r\n\r\nI have more ideas to keep the library more modular (different scales, more method granularity), but I think this can be the base version we can discuss about.\r\n\r\nUn saludo,\r\nDani\r\n"},"comment":{"url":"https://api.github.com/repos/saebekassebil/teoria/issues/comments/100824146","html_url":"https://github.com/saebekassebil/teoria/pull/77#issuecomment-100824146","issue_url":"https://api.github.com/repos/saebekassebil/teoria/issues/77","id":100824146,"user":{"login":"danigb","id":7457,"avatar_url":"https://avatars.githubusercontent.com/u/7457?v=3","gravatar_id":"","url":"https://api.github.com/users/danigb","html_url":"https://github.com/danigb","followers_url":"https://api.github.com/users/danigb/followers","following_url":"https://api.github.com/users/danigb/following{/other_user}","gists_url":"https://api.github.com/users/danigb/gists{/gist_id}","starred_url":"https://api.github.com/users/danigb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danigb/subscriptions","organizations_url":"https://api.github.com/users/danigb/orgs","repos_url":"https://api.github.com/users/danigb/repos","events_url":"https://api.github.com/users/danigb/events{/privacy}","received_events_url":"https://api.github.com/users/danigb/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T09:02:40Z","updated_at":"2015-05-11T09:02:40Z","body":"The code can be vastly improved. I will open an issue insted."}}