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

feat: support supressing empty CSS files in rollup plugin #569

Merged
merged 3 commits into from Mar 20, 2019
Merged

Conversation

@tivac
Copy link
Owner

@tivac tivac commented Mar 20, 2019

Description

It's nice to keep the filesystem clean, and empty CSS files don't do anyone any good so why generate them?

Motivation and Context

Tracked down a bug in our environment to @modular-css/rollup outputting empty files when using cssnano as a done plugin. The empty CSS files it generated were causing load issues in our setup.

Putting it behind an option for now to avoid it being a breaking change, but I suspect that the default value for that option will be flipped at some point here.

How Has This Been Tested?

Added tests to the existing suite.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
tivac added 3 commits Mar 20, 2019
Allows for disabling output of empty files, since sometimes that's not what you want.

Also adding docs for the feature.
@codecov
Copy link

@codecov codecov bot commented Mar 20, 2019

Codecov Report

Merging #569 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #569      +/-   ##
==========================================
+ Coverage   98.98%   98.98%   +<.01%     
==========================================
  Files          49       49              
  Lines        1177     1182       +5     
  Branches      183      184       +1     
==========================================
+ Hits         1165     1170       +5     
  Misses         12       12
Impacted Files Coverage Δ
packages/rollup/rollup.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be57edd...9b2d0a6. Read the comment docs.

Loading

1 similar comment
@codecov
Copy link

@codecov codecov bot commented Mar 20, 2019

Codecov Report

Merging #569 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #569      +/-   ##
==========================================
+ Coverage   98.98%   98.98%   +<.01%     
==========================================
  Files          49       49              
  Lines        1177     1182       +5     
  Branches      183      184       +1     
==========================================
+ Hits         1165     1170       +5     
  Misses         12       12
Impacted Files Coverage Δ
packages/rollup/rollup.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be57edd...9b2d0a6. Read the comment docs.

Loading

@tivac tivac merged commit f9240a3 into master Mar 20, 2019
9 checks passed
Loading
@tivac tivac deleted the rollup-no-empties branch Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant