{"action":"created","issue":{"url":"https://api.github.com/repos/brunch/brunch/issues/1007","labels_url":"https://api.github.com/repos/brunch/brunch/issues/1007/labels{/name}","comments_url":"https://api.github.com/repos/brunch/brunch/issues/1007/comments","events_url":"https://api.github.com/repos/brunch/brunch/issues/1007/events","html_url":"https://github.com/brunch/brunch/issues/1007","id":100296465,"number":1007,"title":"Provide plugin API for compiling to arbitrary, non-concatenated output","user":{"login":"lalomartins","id":1211455,"avatar_url":"https://avatars.githubusercontent.com/u/1211455?v=3","gravatar_id":"","url":"https://api.github.com/users/lalomartins","html_url":"https://github.com/lalomartins","followers_url":"https://api.github.com/users/lalomartins/followers","following_url":"https://api.github.com/users/lalomartins/following{/other_user}","gists_url":"https://api.github.com/users/lalomartins/gists{/gist_id}","starred_url":"https://api.github.com/users/lalomartins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lalomartins/subscriptions","organizations_url":"https://api.github.com/users/lalomartins/orgs","repos_url":"https://api.github.com/users/lalomartins/repos","events_url":"https://api.github.com/users/lalomartins/events{/privacy}","received_events_url":"https://api.github.com/users/lalomartins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-11T11:58:31Z","updated_at":"2015-08-14T17:57:25Z","closed_at":null,"body":"Use case: I'm working on some very simple landing pages, and I don't want to use client-side templates because it's overkill (and makes the load time slower for no reason). But I don't want to write HTML either :smile_cat: not when I have jade.\r\n\r\nPlugins such as jaded-brunch, jade-static-brunch, and siml-static-brunch hack his by writing the files themselves inside the `compile` method. However, this bypasses the brunch pipeline and can have unexpected side-effects (e.g. see #916). Providing an API for this use case would make things neater.\r\n\r\nNot sure what this API should look like, though. Off the top of my head, maybe instead of passing a string to the callback, an object with options, which may include a `path` property?\r\n\r\nExample of why bypassing the pipeline is bad, if anyone needs convincing:\r\n\r\n```coffee\r\n  onCompile: (generatedFiles) ->\r\n    if generatedFiles.length\r\n      console.log generatedFiles.map (f) -> f.path.replace(/^.*\\//, '')\r\n```\r\n\r\noutput:\r\n```log\r\n11 Aug 12:49:38 - info: compiled 4 files into 2 files, copied 22 in 2697ms\r\n[ 'index.js', 'index.css' ]\r\n```"},"comment":{"url":"https://api.github.com/repos/brunch/brunch/issues/comments/131195107","html_url":"https://github.com/brunch/brunch/issues/1007#issuecomment-131195107","issue_url":"https://api.github.com/repos/brunch/brunch/issues/1007","id":131195107,"user":{"login":"paulmillr","id":574696,"avatar_url":"https://avatars.githubusercontent.com/u/574696?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmillr","html_url":"https://github.com/paulmillr","followers_url":"https://api.github.com/users/paulmillr/followers","following_url":"https://api.github.com/users/paulmillr/following{/other_user}","gists_url":"https://api.github.com/users/paulmillr/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmillr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmillr/subscriptions","organizations_url":"https://api.github.com/users/paulmillr/orgs","repos_url":"https://api.github.com/users/paulmillr/repos","events_url":"https://api.github.com/users/paulmillr/events{/privacy}","received_events_url":"https://api.github.com/users/paulmillr/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T17:57:25Z","updated_at":"2015-08-14T17:57:25Z","body":"@lalomartins how would it work?"}}