{"action":"closed","issue":{"url":"https://api.github.com/repos/gfranko/amdclean/issues/116","repository_url":"https://api.github.com/repos/gfranko/amdclean","labels_url":"https://api.github.com/repos/gfranko/amdclean/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/gfranko/amdclean/issues/116/comments","events_url":"https://api.github.com/repos/gfranko/amdclean/issues/116/events","html_url":"https://github.com/gfranko/amdclean/issues/116","id":196509231,"number":116,"title":"function of the calling module goes before the called module: Cannot read property of undefined","user":{"login":"asnov","id":9980139,"avatar_url":"https://avatars.githubusercontent.com/u/9980139?v=3","gravatar_id":"","url":"https://api.github.com/users/asnov","html_url":"https://github.com/asnov","followers_url":"https://api.github.com/users/asnov/followers","following_url":"https://api.github.com/users/asnov/following{/other_user}","gists_url":"https://api.github.com/users/asnov/gists{/gist_id}","starred_url":"https://api.github.com/users/asnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asnov/subscriptions","organizations_url":"https://api.github.com/users/asnov/orgs","repos_url":"https://api.github.com/users/asnov/repos","events_url":"https://api.github.com/users/asnov/events{/privacy}","received_events_url":"https://api.github.com/users/asnov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-19T20:11:29Z","updated_at":"2016-12-28T15:07:50Z","closed_at":"2016-12-28T15:07:50Z","body":"Hi Greg,\r\nI found your tool very usefull. I'm using typescript modules and some other's libraries. So it is great to have build tool to join all together without any loader as I can't use any because I'm working on a library for web-developers and I want them to include it to their applications with one script tag.\r\n\r\nOne issue that I have now is when the number of included libraries increased, amdClean started to put amd-modules in wrong order. I mean the function of the calling module goes before the called module. So I got errors like \"Uncaught TypeError: Cannot read property 'someprop' of undefined\" or \"Uncaught TypeError: libname.funcname is not a function\".\r\n\r\nWhen I change the order of the functions manually in the resulting file, everything goes fine. Could you advise me, please, how could I fix this?\r\n\r\nThank you!"}}
{"actor":{"display_login":"asnov"}}