Skip to content

Commit

Permalink
Use sassc-embeded to compile Sass
Browse files Browse the repository at this point in the history
To do: see if we can configure to silence warning

Built-in sassc compiler doesn't compile
stylesheet do to them, containing source maps

https://github.com/sass-contrib/sassc-embedded-shim-ruby
  • Loading branch information
kr8n3r committed Oct 9, 2024
1 parent a27781d commit 8973a58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions govuk_tech_docs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "openapi3_parser", "~> 0.9.0"
spec.add_dependency "redcarpet", "~> 3.6"
spec.add_dependency "terser", "~> 1.2.3"
spec.add_dependency "sassc-embedded", "~> 1.78.0"

spec.add_development_dependency "byebug"
spec.add_development_dependency "capybara", "~> 3.32"
Expand Down
4 changes: 4 additions & 0 deletions lib/govuk_tech_docs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
require "chronic"
require "active_support/all"
require "terser"
require "sassc-embedded"

require "govuk_tech_docs/redirects"
require "govuk_tech_docs/table_of_contents/helpers"
Expand Down Expand Up @@ -51,6 +52,9 @@ def self.configure(context, options = {})
tables: true,
no_intra_emphasis: true

# this doesnt seem to work
context.set :sass, { output_style: "nested", quiet_deps: true }

# Reload the browser automatically whenever files change
context.configure :development do
activate :livereload, options[:livereload].to_h
Expand Down

0 comments on commit 8973a58

Please sign in to comment.