Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Commit 3e33c6f

Browse files
committed
woff2 support
1 parent 64211e6 commit 3e33c6f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/bootstrap-sass/engine.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Engine < ::Rails::Engine
55
%w(stylesheets javascripts fonts images).each do |sub|
66
app.config.assets.paths << root.join('assets', sub).to_s
77
end
8-
app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff)$)
8+
app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff2?)$)
99
end
1010
end
1111
end

tasks/converter/fonts_conversion.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def process_font_assets
1010
end
1111

1212
def bootstrap_font_files
13-
@bootstrap_font_files ||= get_paths_by_type('fonts', /\.(eot|svg|ttf|woff)$/)
13+
@bootstrap_font_files ||= get_paths_by_type('fonts', /\.(eot|svg|ttf|woff2?)$/)
1414
end
1515
end
1616
end

test/sprockets_rails_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_sprockets_digest_asset_refs
1616
assert compiled, 'Could not precompile assets'
1717
Dir.glob(File.join(root, 'public', 'assets', 'app*.{css,js}')) do |path|
1818
File.open(path, 'r') do |f|
19-
f.read.scan /url\("?[^"]+\.(?:jpg|png|eot|woff|ttf|svg)[^"]*"?\)/ do |m|
19+
f.read.scan /url\("?[^"]+\.(?:jpg|png|eot|woff2?|ttf|svg)[^"]*"?\)/ do |m|
2020
assert_match /-[0-9a-f]{12,}\./, m
2121
end
2222
end

0 commit comments

Comments
 (0)