{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/nunjucks/issues/433","labels_url":"https://api.github.com/repos/mozilla/nunjucks/issues/433/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/nunjucks/issues/433/comments","events_url":"https://api.github.com/repos/mozilla/nunjucks/issues/433/events","html_url":"https://github.com/mozilla/nunjucks/pull/433","id":73041053,"number":433,"title":"Added bundle option to precompiled wrappers","user":{"login":"rhengles","id":8967,"avatar_url":"https://avatars.githubusercontent.com/u/8967?v=3","gravatar_id":"","url":"https://api.github.com/users/rhengles","html_url":"https://github.com/rhengles","followers_url":"https://api.github.com/users/rhengles/followers","following_url":"https://api.github.com/users/rhengles/following{/other_user}","gists_url":"https://api.github.com/users/rhengles/gists{/gist_id}","starred_url":"https://api.github.com/users/rhengles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhengles/subscriptions","organizations_url":"https://api.github.com/users/rhengles/orgs","repos_url":"https://api.github.com/users/rhengles/repos","events_url":"https://api.github.com/users/rhengles/events{/privacy}","received_events_url":"https://api.github.com/users/rhengles/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-04T14:48:12Z","updated_at":"2015-05-07T18:08:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/nunjucks/pulls/433","html_url":"https://github.com/mozilla/nunjucks/pull/433","diff_url":"https://github.com/mozilla/nunjucks/pull/433.diff","patch_url":"https://github.com/mozilla/nunjucks/pull/433.patch"},"body":"Hello!\r\n\r\nI was writing wrappers for the major module formats, but with ES6 I had some difficulty. For named exports, the names must be valid variable identifiers. So I couldn't simply export the template name, because it might contain slashes, dashes, etc, so I had to create a plain old JS object to export as default.\r\n\r\nBut as the file might contain many templates inside, I'd have to create a check for the existence of this object on each template. Instead, I created this PR to be able to create the object once and export it once."},"comment":{"url":"https://api.github.com/repos/mozilla/nunjucks/issues/comments/99963558","html_url":"https://github.com/mozilla/nunjucks/pull/433#issuecomment-99963558","issue_url":"https://api.github.com/repos/mozilla/nunjucks/issues/433","id":99963558,"user":{"login":"rhengles","id":8967,"avatar_url":"https://avatars.githubusercontent.com/u/8967?v=3","gravatar_id":"","url":"https://api.github.com/users/rhengles","html_url":"https://github.com/rhengles","followers_url":"https://api.github.com/users/rhengles/followers","following_url":"https://api.github.com/users/rhengles/following{/other_user}","gists_url":"https://api.github.com/users/rhengles/gists{/gist_id}","starred_url":"https://api.github.com/users/rhengles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhengles/subscriptions","organizations_url":"https://api.github.com/users/rhengles/orgs","repos_url":"https://api.github.com/users/rhengles/repos","events_url":"https://api.github.com/users/rhengles/events{/privacy}","received_events_url":"https://api.github.com/users/rhengles/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T18:08:08Z","updated_at":"2015-05-07T18:08:08Z","body":"I did a little refactoring here (it's best to do this before we ship). The script now precompiles all the templates into an array, then pass this array to the wrapper. The postProcess was a hack, this is a much more proper solution."}}