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

Conversation

Projects
None yet
1 participant
@tivac
Copy link
Owner

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 some commits Mar 20, 2019

feat: add empties option to rollup
Allows for disabling output of empty files, since sometimes that's not what you want.

Also adding docs for the feature.

@tivac tivac self-assigned this Mar 20, 2019

@codecov

This comment has been minimized.

Copy link

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.

1 similar comment
@codecov

This comment has been minimized.

Copy link

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.

@tivac tivac merged commit f9240a3 into master Mar 20, 2019

6 of 9 checks passed

Header rules No header rules processed
Details
Pages changed 2 new files uploaded
Details
Redirect rules No redirect rules processed
Details
Mixed content No mixed content detected
Details
codecov/patch 100% of diff hit (target 98.98%)
Details
codecov/project 98.98% (+<.01%) compared to be57edd
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@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
You can’t perform that action at this time.