Add option to disable the warning for empty css files
I have my own common project folder with lots of small css files. I have no problem if some partials are emply. I might add css to them later. Is there a way to disable the warning?
Add a css comment in them ?
if there is no option in plugin then I will comment empty file and to that I will have to check first which file is empty and which not.
I mean you can add a comment in the empty file, not commenting the import usage.
Yes. That can be done too. Thanks.
Also I would suggestion that in error message instead showing the whole path from root, can be done in shorter way.
file1.css file2.css file3.css file4.css file5.css file6.css is empty
Later I would prefer if this plugin can have an option to disable this warning.
PR are always welcome :)
I'm not good in Javascript, but I will try to learn it and send.
Jitendra Vyas Twitter http://twitter.com/jitendravyas | Linkedin http://www.linkedin.com/in/jitendravyas
On Sun, Sep 20, 2015 at 11:18 PM, Maxime Thirouin [email protected] wrote:
PR are always welcome :)
— Reply to this email directly or view it on GitHub https://github.com/postcss/postcss-import/issues/84#issuecomment-141814726 .
@MoOx Why did you add warning on empty?
Because this might be an user "error".
Usually it's just because user didn't add content yet. And I don't think this feature is useful.
I already have people asking me why "it doesn't work" and where editing the wrong file. It doesn't cost anything right? It just a warning, not an error.
Let's keep it open for a time.
PR welcome to add an option for this. We might change default behavior sometime, not now.
I wish there were an option flag like warnOnEmpty that defaults to true but could be changed with
require('postcss-easy-import')({ prefix : 'true', warnOnEmpty: 'false' }),
😐
Thank you for adding this option.