Add support for building on production.#3
Add support for building on production.#3izaakschroeder wants to merge 2 commits intouetchy:masterfrom
Conversation
17352ca to
f04ddf9
Compare
There was a problem hiding this comment.
This needs cleanup to work with other types of outputs.
|
/ping @uetchy this is ready now and actually works. |
d12ab79 to
1104118
Compare
Since middleman is actually retarded, we hijack `manipulate_resource_list` to do the actual font compilation; every SASS file _needs_ to have all its dependants generated by the time this step passes, so this is the only viable entry point. Since the font depends on a directory of files, and not any individual file, we must also monkey patch `.template?` and `.binary?` since they only work on regular (non-directory) files. Finally we output the generated fonts as resources in order to keep the Sitemap system happy. `no_hash` is enabled permanently since it is now the job of `:asset_hash`.
1104118 to
4f59cf6
Compare
Conflicts: lib/middleman-fontcustom/extension.rb
|
Thanks 😃 |
|
Since they are generated files, Setup middleman: sprockets.append_path File.join root, "build", "stylesheets"
sprockets.append_path File.join root, "build", "fonts"
activate :fontcustom do |fc|
fc.font_name = 'icons'
fc.source_dir = 'source/icons'
fc.fonts_dir = 'fonts'
fc.css_dir = 'stylesheets/components'
fc.templates = 'scss'
fc.font_design_size = 62 # picas not pixels
fc.font_ascent = 850
fc.font_descent = 150
endImport icons: @import "components/icons" |
|
This looks like more rational way. |
Since middleman is actually retarded, we hijack
manipulate_resource_listto do the actual font compilation; every SASS file needs to have all its dependants generated by the time this step passes, so this is the only viable entry point. Since the font depends on a directory of files, and not any individual file, we must also monkey patch.template?and.binary?since they only work on regular (non-directory) files. Finally we output the generated fonts as resources in order to keep the Sitemap system happy.no_hashis enabled permanently since it is now the job of:asset_hash.