{"action":"closed","issue":{"url":"https://api.github.com/repos/morishitter/postcss-style-guide/issues/12","labels_url":"https://api.github.com/repos/morishitter/postcss-style-guide/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/morishitter/postcss-style-guide/issues/12/comments","events_url":"https://api.github.com/repos/morishitter/postcss-style-guide/issues/12/events","html_url":"https://github.com/morishitter/postcss-style-guide/issues/12","id":86517955,"number":12,"title":"Include processed CSS","user":{"login":"koddsson","id":318208,"avatar_url":"https://avatars.githubusercontent.com/u/318208?v=3","gravatar_id":"","url":"https://api.github.com/users/koddsson","html_url":"https://github.com/koddsson","followers_url":"https://api.github.com/users/koddsson/followers","following_url":"https://api.github.com/users/koddsson/following{/other_user}","gists_url":"https://api.github.com/users/koddsson/gists{/gist_id}","starred_url":"https://api.github.com/users/koddsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koddsson/subscriptions","organizations_url":"https://api.github.com/users/koddsson/orgs","repos_url":"https://api.github.com/users/koddsson/repos","events_url":"https://api.github.com/users/koddsson/events{/privacy}","received_events_url":"https://api.github.com/users/koddsson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/morishitter/postcss-style-guide/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/morishitter/postcss-style-guide/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-09T09:04:27Z","updated_at":"2015-06-14T15:22:59Z","closed_at":"2015-06-14T15:22:59Z","body":"I'm not sure if I'm messing up or what but I really want to be able to show the CSS before all the postCSS formatting takes place and then include the compiled CSS on the page to show how it looks.\r\n\r\nWould adding a option of including a extra CSS file be the correct solution to this problem?\r\n\r\nI've made some changes locally that work well enough for my use case.\r\n\r\n#### postcss-style-guide\r\n```\r\ndiff --git a/index.js b/index.js\r\nindex dbbe8aa..cbd024e 100644\r\n--- a/index.js\r\n+++ b/index.js\r\n@@ -64,7 +64,8 @@ function generate (maps, css, options) {\r\n         css: nano(css),\r\n         tmplStyle: nano(options.style),\r\n         codeStyle: nano(codeStyle),\r\n-        maps: maps\r\n+        maps: maps,\r\n+        extraCSS: options.extraCSS\r\n     }\r\n\r\n     var html = ejs.render(options.template, assign)\r\n```\r\n\r\n#### psg-theme-default\r\n```\r\ndiff --git a/template.ejs b/template.ejs\r\nindex 653b0a0..4cde434 100644\r\n--- a/template.ejs\r\n+++ b/template.ejs\r\n@@ -4,6 +4,9 @@\r\n         <meta charset=\"UTF-8\">\r\n         <title><%= projectName %></title>\r\n         <link rel=\"stylesheet\" href=\"./default.css\">\r\n+        <% if (extraCSS) { %>\r\n+        <link rel=\"stylesheet\" href=\"<%= extraCSS %>\">\r\n+        <% } %>\r\n         <style><%- codeStyle %><%- tmplStyle %><%- css %></style>\r\n     </head>\r\n     <body>\r\n```\r\n\r\nThen I have two gulp tasks, one that builds the CSS with all the postCSS transformations\r\n\r\n```javascript\r\n  gulp.task('css', ['clean:css'], function() {\r\n    return gulp.src(paths.css)\r\n      .pipe(sourcemaps.init())\r\n      .pipe(concat('index.css'))\r\n      .pipe(postcss([\r\n        require('cssnext')(),\r\n        require('postcss-nested')(),\r\n        require('autoprefixer-core')(),\r\n        require('postcss-import')(),\r\n      ]))\r\n      .pipe(sourcemaps.write('.'))\r\n      .pipe(gulp.dest('dist/'))\r\n      .pipe(connect.reload());\r\n  });\r\n```\r\n\r\nand one for the guide where it passes the built CSS filename in as a option.\r\n\r\n```javascript\r\ngulp.task('guide', function() {\r\n  return gulp.src(paths.css)\r\n    .pipe(postcss([\r\n      require('postcss-style-guide')({\r\n        name: 'Bókun', extraCSS: \"http://localhost:8001/index.css\"\r\n      })\r\n    ]));\r\n});\r\n```"}}