tomasbasham / ember-cli-scss-lint

An ember-cli addon to integrate sass-lint for standards adherence and improved style consistency
MIT License
7 stars 6 forks source link

Addon breaks CSS hot reloading #14

Open mirague opened 7 years ago

mirague commented 7 years ago

Anytime a change to a .scss file is made, the assets/tests.js is also modified, resulting in a full-page reload. Removing the addon restores the functioning of the hot reloading.

Observe this by running DEBUG="ember-cli:live-reload*" ember serve:

file changed styles/app.scss

styles/app.scss
  26:10  warning  Color 'red' should be written in its hexadecimal form #ff0000  no-color-keywords

✖ 1 problem (0 errors, 1 warning)

Build successful (464ms) – Serving on http://localhost:4200/
  ember-cli:live-reload: files %a [ 'assets/myApp.css', 'assets/tests.js' ] +6s

Slowest Nodes (totalTime => 5% )              | Total (avg)
----------------------------------------------+---------------------
SassCompiler (1)                              | 150ms
broccoli-persistent-filter:Autoprefixe... (1) | 55ms
SourceMapConcat: Concat: Vendor /asset... (1) | 36ms
Funnel: Addon JS (21)                         | 29ms (1 ms)

Any tips on how to prevent a reload?

tomasbasham commented 7 years ago

Hi. I tracked down what is causing this issue. It is a problem where the underlying broccoli plugin is generating tests even in a development environment, thus causing the change to assets/tests.js. I'll try to push a fix for this ASAP, but unfortunately there are no tips I can offer to prevent it in the meantime.

tomasbasham commented 7 years ago

For clarity. This is the line causing the issue. I think it should only be there when running the test suite