{"action":"closed","issue":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/1771","labels_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/1771/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/1771/comments","events_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/1771/events","html_url":"https://github.com/ember-cli/ember-cli/issues/1771","id":41208081,"number":1771,"title":"Automatically Shim 3rd Party Globals","user":{"login":"chadhietala","id":183799,"avatar_url":"https://avatars.githubusercontent.com/u/183799?v=3","gravatar_id":"","url":"https://api.github.com/users/chadhietala","html_url":"https://github.com/chadhietala","followers_url":"https://api.github.com/users/chadhietala/followers","following_url":"https://api.github.com/users/chadhietala/following{/other_user}","gists_url":"https://api.github.com/users/chadhietala/gists{/gist_id}","starred_url":"https://api.github.com/users/chadhietala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadhietala/subscriptions","organizations_url":"https://api.github.com/users/chadhietala/orgs","repos_url":"https://api.github.com/users/chadhietala/repos","events_url":"https://api.github.com/users/chadhietala/events{/privacy}","received_events_url":"https://api.github.com/users/chadhietala/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-08-26T18:57:03Z","updated_at":"2015-03-05T01:36:17Z","closed_at":"2015-03-05T01:36:16Z","body":"Looked through the tickets and didn't find anything about automatically generating shim files for 3rd party non-amd code.  I was thinking the api could look something like the following.\r\n\r\n```\r\napp.import('path/to/global', {\r\n   global: 'moment'\r\n});\r\n```\r\nWhen you build you just run this through a template to generate a GLOBAL_NAME-shim.js that looks something like.\r\n\r\n```\r\ndefine('moment', (function ( ctx ) {\r\n  return { 'moment' : ctx['moment'] }\r\n})(window));\r\n```\r\n\r\nThis way you can include 3rd party global code like this, without having to deal with the shimming your self.\r\n\r\n```\r\nimport moment from 'moment';\r\n```"}}