Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable the warning for empty css files #84

Closed
jitendravyas opened this issue Sep 20, 2015 · 15 comments · Fixed by #541
Closed

Add option to disable the warning for empty css files #84

jitendravyas opened this issue Sep 20, 2015 · 15 comments · Fixed by #541

Comments

@jitendravyas
Copy link

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?

@MoOx
Copy link
Contributor

MoOx commented Sep 20, 2015

Add a css comment in them ?

@jitendravyas
Copy link
Author

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.

@MoOx
Copy link
Contributor

MoOx commented Sep 20, 2015

I mean you can add a comment in the empty file, not commenting the import usage.

@jitendravyas
Copy link
Author

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.

@MoOx
Copy link
Contributor

MoOx commented Sep 20, 2015

PR are always welcome :)

@jitendravyas
Copy link
Author

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 notifications@github.com
wrote:

PR are always welcome :)


Reply to this email directly or view it on GitHub
#84 (comment)
.

@TrySound
Copy link
Member

TrySound commented Jan 9, 2016

@MoOx Why did you add warning on empty?

@MoOx
Copy link
Contributor

MoOx commented Jan 10, 2016

Because this might be an user "error".

@TrySound
Copy link
Member

Usually it's just because user didn't add content yet. And I don't think this feature is useful.

@MoOx
Copy link
Contributor

MoOx commented Jan 27, 2016

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.

@TrySound
Copy link
Member

Let's keep it open for a time.

@RyanZim RyanZim changed the title How to disable the warning I get for empty css file? Add option to disable the warning for empty css files Nov 3, 2016
@RyanZim
Copy link
Collaborator

RyanZim commented Nov 3, 2016

PR welcome to add an option for this. We might change default behavior sometime, not now.

@maxfenton
Copy link

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' }),

@babakfp

This comment was marked as off-topic.

@maxfenton
Copy link

Thank you for adding this option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants