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 css extraction and minification to webpack #9944

Merged
merged 3 commits into from
Jan 25, 2020

Conversation

silverwind
Copy link
Member

This changes the CSS output of webpack to output to the public/css directory instead of inling CSS in JS. This enables CSS minification and autoprefixer based on browserslist which would otherwise not be possible.

The result of this change is two new output files currently:

  • public/css/swagger.css
  • public/css/gitgraph.css

@codecov-io
Copy link

codecov-io commented Jan 22, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@c43dec4). Click here to learn what that means.
The diff coverage is 51.69%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #9944   +/-   ##
=========================================
  Coverage          ?   42.24%           
=========================================
  Files             ?      610           
  Lines             ?    80295           
  Branches          ?        0           
=========================================
  Hits              ?    33919           
  Misses            ?    42214           
  Partials          ?     4162
Impacted Files Coverage Δ
models/models.go 61.71% <ø> (ø)
models/repo_list.go 76.81% <ø> (ø)
models/issue.go 54.81% <ø> (ø)
routers/api/v1/org/hook.go 0% <0%> (ø)
cmd/admin.go 0% <0%> (ø)
routers/org/teams.go 0% <0%> (ø)
models/pull_sign.go 34.86% <0%> (ø)
routers/api/v1/repo/issue_subscription.go 0% <0%> (ø)
routers/api/v1/repo/release.go 46.2% <0%> (ø)
routers/api/v1/repo/key.go 20.37% <0%> (ø)
... and 88 more

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 c43dec4...8447d64. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 22, 2020
@silverwind
Copy link
Member Author

In case anyone's wondering: webpack build time is pretty much unchanged.

@zeripath zeripath added topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile topic/ui Change the appearance of the Gitea UI labels Jan 22, 2020
@zeripath zeripath added this to the 1.12.0 milestone Jan 22, 2020
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 22, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 23, 2020
This changes the CSS output of webpack to output to the public/css
directory instead of inling CSS in JS. This enables CSS minification and
autoprefixer based on browserslist which would otherwise not be
possible.

The result of this change is two new output files currently:

- public/css/swagger.css
- public/css/gitgraph.css
@silverwind
Copy link
Member Author

Rebased and added some trailing commas in webpack.config.js for consistency.

@lunny lunny merged commit 5b17bb8 into go-gitea:master Jan 25, 2020
@silverwind silverwind deleted the css-extract branch January 25, 2020 09:12
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants