SC5 / sc5-styleguide

Styleguide generator is a handy little tool that helps you generate good looking styleguides from stylesheets using KSS notation
http://styleguide.sc5.io/
MIT License
1.26k stars 167 forks source link

disableEncapsulation: true and watching scss? #1071

Open kivils opened 7 years ago

kivils commented 7 years ago

Thanks for this tool, it's very useful!

I've implemented it into my gulp workflow about a year ago. Recently I've upgraded to nodejs v6, and now I have an issue watching scss-files. (I'm not sure if this issue existed in nodejs v4 though).

My experience is as follows:

  1. If disableEncapsulation is set to false, gulp watch task works as expected: when I edit scss-files, the page with my styleguide reloads in the browser, and I can see edited styles on the page. Extra js are not applied.
  2. When I set disableEncapsulation to true (as I need extra js for styleguide - I use afterBody parameter), the page reloads in the browser, but new styles are not applied. I have to reload browser manually to see new styles on the page. Extra js are applied.

Is there a way to implement both features (extra js and watching mode for scss-files) at the same time?

Thanks!

Environment: Windows 7 nodejs v6.9.5 gulp - local version 3.9.1, CLI version 1.2.1 npm v3.10.10 sc5-styleguide - v1.5.0