Project

General

Profile

Bug #13005

Plugin CSS assets are not minified during precompilation

Added by Dominic Cleal over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugins-Engines
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When precompiling assets for a single plugin using the plugin:assets:precompile[..] rake task, CSS assets aren't compressed/minified causing larger files and extraneous comments that cause problems in RPM package builds.

15:11 $ rm -rf ../foreman-docker/public/assets/; rake plugin:assets:precompile[foreman_docker] RAILS_ENV=production                    
I, [2016-01-05T15:11:25.226586 #6108]  INFO -- : Writing /home/dcleal/code/foreman/foreman-docker/public/assets/foreman_docker/image_step-09f30942adb07686adfa07d432754688.js
I, [2016-01-05T15:11:25.229654 #6108]  INFO -- : Writing /home/dcleal/code/foreman/foreman-docker/public/assets/foreman_docker/autocomplete-add07b3e071b06a9a6d681827e6deaf8.css
I, [2016-01-05T15:11:25.232217 #6108]  INFO -- : Writing /home/dcleal/code/foreman/foreman-docker/public/assets/foreman_docker/terminal-7a369111145089ba19c259243fcb1d98.css
15:12 $ head ../foreman-docker/public/assets/foreman_docker/terminal-*.css                                                                                                                                                                                                     
/* line 2, /home/dcleal/code/foreman/foreman-docker/app/assets/stylesheets/foreman_docker/terminal.css.scss */
.terminal .terminal-output .format {
  display: inline-block; }
/* line 5, /home/dcleal/code/foreman/foreman-docker/app/assets/stylesheets/foreman_docker/terminal.css.scss */
.terminal .terminal-output div div {
  display: inline-block; }
/* line 8, /home/dcleal/code/foreman/foreman-docker/app/assets/stylesheets/foreman_docker/terminal.css.scss */
.terminal .clipboard {
  position: absolute;
  bottom: 0;

This should look more like:

.terminal .terminal-output .format{display:inline-block}.terminal .terminal-output div div{display:inline-block}.terminal .clipboard{position:absolute;bottom:0;left:0;opacity:0.01;filter:alpha(opacity=0.01);filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0.01);width:2px}.terminal{padding:10px;position:relative;overflow-y:scroll}. .....

(from an RPM build of foreman-docker under Rails 3, pre #7230)


Related issues

Related to Foreman - Feature #7230: Upgrade Ruby on Rails to 4.1Closed2014-08-22

Associated revisions

Revision 538c64dc (diff)
Added by Dominic Cleal over 3 years ago

fixes #13005 - enable CSS compression in plugin precompilation

History

#1 Updated by The Foreman Bot over 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3024 added

#2 Updated by Dominic Cleal over 3 years ago

#3 Updated by Dominic Cleal over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF