{"action":"created","issue":{"url":"https://api.github.com/repos/shutterstock/rickshaw/issues/52","labels_url":"https://api.github.com/repos/shutterstock/rickshaw/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/shutterstock/rickshaw/issues/52/comments","events_url":"https://api.github.com/repos/shutterstock/rickshaw/issues/52/events","html_url":"https://github.com/shutterstock/rickshaw/issues/52","id":4688121,"number":52,"title":"`object is not a function` error after uglify minification","user":{"login":"jzaefferer","id":52585,"avatar_url":"https://avatars.githubusercontent.com/u/52585?v=3","gravatar_id":"","url":"https://api.github.com/users/jzaefferer","html_url":"https://github.com/jzaefferer","followers_url":"https://api.github.com/users/jzaefferer/followers","following_url":"https://api.github.com/users/jzaefferer/following{/other_user}","gists_url":"https://api.github.com/users/jzaefferer/gists{/gist_id}","starred_url":"https://api.github.com/users/jzaefferer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzaefferer/subscriptions","organizations_url":"https://api.github.com/users/jzaefferer/orgs","repos_url":"https://api.github.com/users/jzaefferer/repos","events_url":"https://api.github.com/users/jzaefferer/events{/privacy}","received_events_url":"https://api.github.com/users/jzaefferer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2012-05-22T10:45:44Z","updated_at":"2015-01-20T23:18:44Z","closed_at":"2014-05-28T21:45:14Z","body":"When minifying Rickshaw with uglify (via requirejs/r.js), I'm getting an \"object is not a function\" error somewhere from Rickshaw, while trying to render a bar graph. Here's a screenshot from Chrome's script panel, paused on uncaught exceptions: http://bassistance.de/i/50e880.png\n\nSo the error is thrown in `Rickshaw.Graph.Renderer.Bar.Rickshaw.Class.create.initialize`, which is reasonable, as both arguments are objects, not functions. Though I have no idea why an object is passed where a function is expected. Maybe someone more familar with the code base can tell.\n\nHere's the code to render the graph in our application: https://gist.github.com/5552abdf24227e5f7cb6\nWithout minification that works fine."},"comment":{"url":"https://api.github.com/repos/shutterstock/rickshaw/issues/comments/70754973","html_url":"https://github.com/shutterstock/rickshaw/issues/52#issuecomment-70754973","issue_url":"https://api.github.com/repos/shutterstock/rickshaw/issues/52","id":70754973,"user":{"login":"kermit666","id":1818628,"avatar_url":"https://avatars.githubusercontent.com/u/1818628?v=3","gravatar_id":"","url":"https://api.github.com/users/kermit666","html_url":"https://github.com/kermit666","followers_url":"https://api.github.com/users/kermit666/followers","following_url":"https://api.github.com/users/kermit666/following{/other_user}","gists_url":"https://api.github.com/users/kermit666/gists{/gist_id}","starred_url":"https://api.github.com/users/kermit666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kermit666/subscriptions","organizations_url":"https://api.github.com/users/kermit666/orgs","repos_url":"https://api.github.com/users/kermit666/repos","events_url":"https://api.github.com/users/kermit666/events{/privacy}","received_events_url":"https://api.github.com/users/kermit666/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T23:18:44Z","updated_at":"2015-01-20T23:18:44Z","body":"Tried different exclude options, but none of them worked. In the end I had to disable usemin's minification  for JavaScript like this:\r\n\r\n```\r\n        useminPrepare: {\r\n            options: {\r\n                dest: '<%= config.dist %>',\r\n                flow: {\r\n                    html: {\r\n                        steps: {'js': ['concat'], 'css': ['concat', 'cssmin']},\r\n                        post: {}\r\n                    }\r\n                }\r\n            },\r\n            html: '<%= config.app %>/index.html'\r\n        },\r\n```\r\n\r\nI don't see this as a good solution, though - dependency management and build systems in JavaScript are complicated enough even without having to customize them specifically for individual libraries."}}