sass-brunch icon indicating copy to clipboard operation
sass-brunch copied to clipboard

Files with underscores compiled?

Open cjamison opened this issue 9 years ago • 5 comments

I had thought that files with underscores were not compiled. However, using version 2.10.4, I have files with underscores (e.g., _global.scss) that are being compiled. I even put them in a directory with an underscore but that did not help.

These files are in a directory hierarchy that brunch is watching; however, I thought these would be ignored. When I include these in my "main" file the CSS gets duplicated (once because the file itself is compiled and again because it is included in the main file). Is this a bug? Or, do I not understand how this should work?

cjamison avatar Apr 11 '17 01:04 cjamison

I am aware of this error and just looked into it.

It's not really a sass-brunch error, brunch itself calls the Plugin in order to compile that file, but since brunch doesn't know that the file is a sass-submodule, the internal node-sass package fails to compile.

The following commit would fix the plugin, creating pull request soon. https://github.com/max-scopp/sass-brunch/commit/cc6f0bac1509b12133a49a1839ea871095faf900

You can use my sass-brunch version, since I rarely see activity here and I don't think this will be merged soon.

My version is also a bit more compatible with post-processors like css-next. Hope this helps you.

max-scopp avatar May 04 '17 09:05 max-scopp

https://github.com/max-scopp/sass-brunch/commit/cc6f0bac1509b12133a49a1839ea871095faf900 LGTM 👍🏻

denysdovhan avatar May 09 '17 11:05 denysdovhan

Not cool to check for _. This should be configurable by conventions.ignored.

shvaikalesh avatar May 09 '17 17:05 shvaikalesh

Please default to ignore _*.scss and make it configurable.

J-Kallunki avatar Dec 03 '17 09:12 J-Kallunki

Just spent a few hours pulling my hair out over this one. It really would be great to ignore _ files, agreed.

lightcap avatar Apr 03 '18 08:04 lightcap