You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to use a custom template. It works. But, for example, when i use this font https://www.google.com/fonts/specimen/PT+Sans. I have no issue with the regular style. But if i add the bold or italic style in the resources directory, i have this issue :
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `eval': (erb):34: invalid multibyte char (UTF-8) (SyntaxError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `result'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/string_renderer.rb:8:in `render'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/file_manager.rb:74:in `render_template'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/file_manager.rb:66:in `move_template'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/file_manager.rb:48:in `block in copy_template_directory'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/find.rb:43:in `block in find'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/find.rb:42:in `catch'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/find.rb:42:in `find'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/file_manager.rb:46:in `copy_template_directory'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/file_manager.rb:15:in `generate'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:58:in `move_template'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:32:in `add_file'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:24:in `create_tree'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:44:in `block (2 levels) in create_groups_for_tree'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:43:in `each'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:43:in `block in create_groups_for_tree'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:37:in `each_pair'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:37:in `create_groups_for_tree'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:26:in `create_tree'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:12:in `block (2 levels) in create_project'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:11:in `each'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:11:in `block in create_project'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:10:in `each'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/project_builder.rb:10:in `create_project'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/launchpad.rb:63:in `generate_project'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/launchpad.rb:15:in `block in liftoff'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/file_manager.rb:5:in `chdir'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/file_manager.rb:5:in `create_project_dir'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/launchpad.rb:14:in `liftoff'
from /usr/local/Cellar/liftoff/1.5.0/rubylib/liftoff/cli.rb:10:in `run'
from /usr/local/bin/liftoff:14:in `<main>'
Makes sense. I think we're basically assuming text-based templates, not binaries. I'd be willing to bet that this is because we're trying to pass the font through ERB, but I'd need to investigate.
I did some test. If i modify string_renderer.rb to catch SyntaxError exception, it works :
defrender(string)beginERB.new(string).result(@config.get_binding)rescueSyntaxErrorputs"We can't apply template on this file."endendend
I don't know if it's the best solution for this issue, or if it's better to check before if the file is a binary. I know that copy font files isn't common. But i have the same issue with some images that was in Images.xcassets.
Edit :
In fact, files are corrupt after that. So, it doesn't work.
I try to use a custom template. It works. But, for example, when i use this font https://www.google.com/fonts/specimen/PT+Sans. I have no issue with the regular style. But if i add the bold or italic style in the resources directory, i have this issue :
Here, my liftoffrc :
The text was updated successfully, but these errors were encountered: