Skip to content

Commit

Permalink
Build with sassc
Browse files Browse the repository at this point in the history
This removes the sass depedency of this gem and instead replaces it with
a sassc-rails dependency. This is set as a development dependency as
this is only required for the dummy version of this app and this gem
should not force a particular version of sass on consuming apps without
good reason.

This should help GOV.UK gradually move towards a world without Ruby
SASS. Prior to this change introducing govuk_publishing_components into
an application forced Ruby SASS in as a dependency, this has the effect
in Sprockets of choosing Ruby SASS over sassc.

A downside of doing this is that it will make the warm cache run slower
for requests. Until GOV.UK Frontend resolves some performance issues [1]
we may find each page of the dummy app loads a reasonable amount slower
in a development environment. Although not ideal, I don't think this
performance issue will cause anyone significant problems developing on
this app (I get about 2.5s on my local machine) and it'll be nice for us
to have already started the sassc journey.

[1]: alphagov/govuk-frontend#1671
  • Loading branch information
kevindew committed Apr 30, 2020
1 parent c6a7cc9 commit 9e3c59e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
27 changes: 9 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ PATH
rails (>= 5.0.0.1)
rake
rouge
sass (= 3.7.4)
sassc-rails (>= 2.0.1)
sprockets (< 4)

GEM
Expand Down Expand Up @@ -61,9 +59,9 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
arel (9.0.0)
ast (2.4.0)
brakeman (4.8.0)
brakeman (4.8.1)
builder (3.2.4)
byebug (11.1.1)
byebug (11.1.3)
capybara (3.32.1)
addressable
mini_mime (>= 0.1.3)
Expand Down Expand Up @@ -134,7 +132,7 @@ GEM
activesupport (>= 4.0)
logstash-event (~> 1.2.0)
request_store
loofah (2.4.0)
loofah (2.5.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
Expand All @@ -144,7 +142,7 @@ GEM
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
mime-types-data (3.2020.0425)
mimemagic (0.3.4)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
Expand All @@ -160,7 +158,7 @@ GEM
ast (~> 2.4.0)
phantomjs (2.1.1.0)
plek (3.0.0)
pry (0.13.0)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
Expand Down Expand Up @@ -201,9 +199,6 @@ GEM
rainbow (3.0.0)
raindrops (0.19.1)
rake (13.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.7.0)
request_store (1.5.0)
rack (>= 1.4)
Expand Down Expand Up @@ -255,12 +250,7 @@ GEM
ruby-progressbar (1.10.1)
rubyzip (2.3.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.2.1)
sassc (2.3.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
Expand Down Expand Up @@ -292,10 +282,10 @@ GEM
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
unicorn (5.5.4)
unicorn (5.5.5)
kgio (~> 2.6)
raindrops (~> 0.7)
webdrivers (4.2.0)
webdrivers (4.3.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
Expand Down Expand Up @@ -324,6 +314,7 @@ DEPENDENCIES
pry-byebug
rspec-rails (~> 4.0)
rubocop-govuk (~> 3)
sassc-rails (~> 2)
selenium-webdriver (= 3.142.7)
uglifier (>= 4.1.0)
webmock (~> 3.8.3)
Expand Down
3 changes: 1 addition & 2 deletions govuk_publishing_components.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Gem::Specification.new do |s|
s.add_dependency "rails", ">= 5.0.0.1"
s.add_dependency "rake"
s.add_dependency "rouge"
s.add_dependency "sass", "3.7.4"
s.add_dependency "sassc-rails", ">= 2.0.1"
s.add_dependency "sprockets", "< 4"

s.add_development_dependency "capybara", "~> 3.25"
Expand All @@ -35,6 +33,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "pry-byebug"
s.add_development_dependency "rspec-rails", "~> 4.0"
s.add_development_dependency "rubocop-govuk", "~> 3"
s.add_development_dependency "sassc-rails", "~> 2"
s.add_development_dependency "selenium-webdriver", "= 3.142.7"
s.add_development_dependency "uglifier", ">= 4.1.0"
# Webmock is needed to load slimmer test helpers
Expand Down

0 comments on commit 9e3c59e

Please sign in to comment.