{"action":"created","issue":{"url":"https://api.github.com/repos/mde/ejs/issues/123","repository_url":"https://api.github.com/repos/mde/ejs","labels_url":"https://api.github.com/repos/mde/ejs/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/mde/ejs/issues/123/comments","events_url":"https://api.github.com/repos/mde/ejs/issues/123/events","html_url":"https://github.com/mde/ejs/issues/123","id":121606614,"number":123,"title":"Add support for source maps","user":{"login":"sitegui","id":2801575,"avatar_url":"https://avatars.githubusercontent.com/u/2801575?v=3","gravatar_id":"","url":"https://api.github.com/users/sitegui","html_url":"https://github.com/sitegui","followers_url":"https://api.github.com/users/sitegui/followers","following_url":"https://api.github.com/users/sitegui/following{/other_user}","gists_url":"https://api.github.com/users/sitegui/gists{/gist_id}","starred_url":"https://api.github.com/users/sitegui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sitegui/subscriptions","organizations_url":"https://api.github.com/users/sitegui/orgs","repos_url":"https://api.github.com/users/sitegui/repos","events_url":"https://api.github.com/users/sitegui/events{/privacy}","received_events_url":"https://api.github.com/users/sitegui/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mde/ejs/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/mde/ejs/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2015-12-11T00:08:07Z","updated_at":"2016-10-25T11:37:11Z","closed_at":null,"body":"Hi all,\r\n\r\nIn PR #56, it was discussed one can modify the EJS source before handing it to `ejs.compile()`.\r\nIt works, but has the downside of making the extended error messages (with EJS source and line numbers) hard to read, since all source will probably be presented as one line.\r\n\r\nAnother solution is to minify the `render()`'s output, but this may be too expensive. In my benchmarks, using [html-minifier](https://www.npmjs.com/package/html-minifier), it takes more than 100ms (for my use case, that's too much).\r\n\r\nBut I think offering HTML minification as part of EJS is not the way to go either, since it would bloat this wonderful module too much and would not solve the underlying problem with pre-processed source.\r\n\r\nWhat if EJS could accept a source map as part of the compilation and use it to report the right line number and original source? This way, HTML minification could be part of another module, separating concerns.\r\n\r\nI'd like to hear you position on this issue: do you think this module should accommodate this use case?\r\n\r\nBest regards,\r\nGuilherme"},"comment":{"url":"https://api.github.com/repos/mde/ejs/issues/comments/256010994","html_url":"https://github.com/mde/ejs/issues/123#issuecomment-256010994","issue_url":"https://api.github.com/repos/mde/ejs/issues/123","id":256010994,"user":{"login":"RyanZim","id":17342435,"avatar_url":"https://avatars.githubusercontent.com/u/17342435?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanZim","html_url":"https://github.com/RyanZim","followers_url":"https://api.github.com/users/RyanZim/followers","following_url":"https://api.github.com/users/RyanZim/following{/other_user}","gists_url":"https://api.github.com/users/RyanZim/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanZim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanZim/subscriptions","organizations_url":"https://api.github.com/users/RyanZim/orgs","repos_url":"https://api.github.com/users/RyanZim/repos","events_url":"https://api.github.com/users/RyanZim/events{/privacy}","received_events_url":"https://api.github.com/users/RyanZim/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T11:37:11Z","updated_at":"2016-10-25T11:37:11Z","body":"Before we go too far on this, a few questions:\r\n\r\n- Source maps work for JS & CSS. Is there any browser capable of handling HTML source maps?\r\n- JS source maps are linked with `//# sourceMappingURL=<url>`, how would HTML maps be linked? I can't find anything in the spec other than the HTTP header (https://sourcemaps.info/spec.html#h.lmz475t4mvbx).\r\n- I know there was talk of HTML source maps in the past, but are there any template engines or HTML minifiers that actually produce or handle source maps? (@TimothyGu?)  If not, there is little point in EJS implementing this."}}
{"actor":{"display_login":"RyanZim"}}