1
0
Fork 0
mirror of https://github.com/twbs/bootstrap-sass.git synced 2022-11-09 12:27:02 -05:00

Process font assets in converter

This commit is contained in:
Peter Gumeson 2013-05-24 17:44:07 -07:00
parent ad8cc1ecd4
commit 5a5d80d20f
5 changed files with 16 additions and 0 deletions

View file

@ -24,6 +24,7 @@ class Converter
def process
process_stylesheet_assets
process_javascript_assets
process_font_assets
end
def process_stylesheet_assets
@ -76,6 +77,15 @@ class Converter
save_file(path, content)
end
def process_font_assets
puts "\nProcessing fonts..."
bootstrap_font_files.each do |name|
file = open("https://raw.github.com/twitter/bootstrap/#{@branch}/fonts/#{name}").read
path = "vendor/assets/fonts/#{name}"
save_file(path, file)
end
end
private
# Get the sha of a dir
@ -97,6 +107,12 @@ private
files['tree'].select{|f| f['type'] == 'blob' && f['path'] =~ /.js$/ }.map{|f| f['path'] }
end
def bootstrap_font_files
files = open("https://api.github.com/repos/twitter/bootstrap/git/trees/#{get_tree_sha('fonts')}").read
files = JSON.parse files
files['tree'].select{|f| f['type'] == 'blob' }.map{|f| f['path'] }
end
def get_mixins_name
mixins = []
less_mixins = open("https://raw.github.com/twitter/bootstrap/#{@branch}/less/mixins.less").read

0
vendor/assets/fonts/glyphiconshalflings-regular.eot vendored Executable file → Normal file
View file

0
vendor/assets/fonts/glyphiconshalflings-regular.svg vendored Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

0
vendor/assets/fonts/glyphiconshalflings-regular.ttf vendored Executable file → Normal file
View file

0
vendor/assets/fonts/glyphiconshalflings-regular.woff vendored Executable file → Normal file
View file