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

Support other Sass processors #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Support other Sass processors
This softens the "sassc" dependency in order to allow for Dart Sass to
be used, since Ruby Sass has been deprecated.
  • Loading branch information
mattmenefee committed Feb 14, 2024
commit 26338cb47dff54d16639901bbbae12d7b4852de9
2 changes: 0 additions & 2 deletions font-awesome-sass.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.add_runtime_dependency 'sassc', '~> 2.0'

spec.add_development_dependency 'bundler', '>= 1.3'
spec.add_development_dependency 'rake'
end
14 changes: 14 additions & 0 deletions lib/font-awesome-sass.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
begin
require 'sassc'
rescue LoadError
begin
require 'sassc-embedded'
rescue LoadError
begin
require 'sass-embedded'
rescue LoadError
raise LoadError.new('font-awesome-sass-rubygem requires a Sass engine. Please add dartsass-sprockets, sassc-rails, dartsass-rails or cssbundling-rails to your dependencies.')
end
end
end

module FontAwesome
module Sass
class << self
Expand Down