{"action":"created","issue":{"url":"https://api.github.com/repos/Rich-Harris/esperanto/issues/20","labels_url":"https://api.github.com/repos/Rich-Harris/esperanto/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/Rich-Harris/esperanto/issues/20/comments","events_url":"https://api.github.com/repos/Rich-Harris/esperanto/issues/20/events","html_url":"https://github.com/Rich-Harris/esperanto/issues/20","id":52568057,"number":20,"title":"Annotate modules when bundling, and add banner/footer options","user":{"login":"Rich-Harris","id":1162160,"avatar_url":"https://avatars.githubusercontent.com/u/1162160?v=3","gravatar_id":"","url":"https://api.github.com/users/Rich-Harris","html_url":"https://github.com/Rich-Harris","followers_url":"https://api.github.com/users/Rich-Harris/followers","following_url":"https://api.github.com/users/Rich-Harris/following{/other_user}","gists_url":"https://api.github.com/users/Rich-Harris/gists{/gist_id}","starred_url":"https://api.github.com/users/Rich-Harris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rich-Harris/subscriptions","organizations_url":"https://api.github.com/users/Rich-Harris/orgs","repos_url":"https://api.github.com/users/Rich-Harris/repos","events_url":"https://api.github.com/users/Rich-Harris/events{/privacy}","received_events_url":"https://api.github.com/users/Rich-Harris/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Rich-Harris/esperanto/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-20T16:02:33Z","updated_at":"2015-01-03T17:51:55Z","closed_at":null,"body":"See https://github.com/ractivejs/ractive/issues/1573#issuecomment-67739631 - would be useful, particularly for people who can't use sourcemaps for whatever reason, if modules could be annotated with e.g. path information.\r\n\r\nSomething like\r\n\r\n```js\r\nesperanto.bundle({\r\n  base: 'src',\r\n  entry: 'main',\r\n  prefix: function ( path, contents ) {\r\n    return '/* START ' + path + ' */\\n';\r\n  },\r\n  postfix: function ( path, contents ) {\r\n    return '\\n/* END ' + path + ' */';\r\n  }\r\n});\r\n```\r\n\r\nSimilarly, it would be good to support banners/footers - easier to do it inside Esperanto than with an external concatenator, so it doesn't cause sourcemap headaches"},"comment":{"url":"https://api.github.com/repos/Rich-Harris/esperanto/issues/comments/68603149","html_url":"https://github.com/Rich-Harris/esperanto/issues/20#issuecomment-68603149","issue_url":"https://api.github.com/repos/Rich-Harris/esperanto/issues/20","id":68603149,"user":{"login":"Rich-Harris","id":1162160,"avatar_url":"https://avatars.githubusercontent.com/u/1162160?v=3","gravatar_id":"","url":"https://api.github.com/users/Rich-Harris","html_url":"https://github.com/Rich-Harris","followers_url":"https://api.github.com/users/Rich-Harris/followers","following_url":"https://api.github.com/users/Rich-Harris/following{/other_user}","gists_url":"https://api.github.com/users/Rich-Harris/gists{/gist_id}","starred_url":"https://api.github.com/users/Rich-Harris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rich-Harris/subscriptions","organizations_url":"https://api.github.com/users/Rich-Harris/orgs","repos_url":"https://api.github.com/users/Rich-Harris/repos","events_url":"https://api.github.com/users/Rich-Harris/events{/privacy}","received_events_url":"https://api.github.com/users/Rich-Harris/received_events","type":"User","site_admin":false},"created_at":"2015-01-03T17:51:55Z","updated_at":"2015-01-03T17:51:55Z","body":"The `banner` and `footer` options are now supported:\r\n\r\n```js\r\nvar cjs = esperanto.toCjs( source, {\r\n  banner: copyrightInfo + '\\n'\r\n});\r\n\r\nesperanto.bundle( options ).then( function ( bundle ) {\r\n  var cjs = bundle.toCjs({\r\n    banner: copyrightInfo + '\\n'\r\n  });\r\n});\r\n```\r\n\r\nPer-module annotations aren't implemented yet though"}}