mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Use HamlEngine for CLI
This commit is contained in:
parent
83b73aaa25
commit
0b7677f1c8
1 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@ module Hamlit
|
|||
|
||||
def generate_code(file)
|
||||
template = File.read(file)
|
||||
Hamlit::Engine.new(engine_options).call(template)
|
||||
Hamlit::HamlEngine.new(template, haml_options).precompiled
|
||||
end
|
||||
|
||||
def generate_ast(file)
|
||||
|
@ -33,8 +33,8 @@ module Hamlit
|
|||
Hamlit::Parser.new.call(template)
|
||||
end
|
||||
|
||||
def engine_options
|
||||
{ pretty: options['style'] == 'pretty' }
|
||||
def haml_options
|
||||
{ ugly: options['style'] != 'pretty' }
|
||||
end
|
||||
|
||||
# Flexible default_task, compatible with haml's CLI
|
||||
|
|
Loading…
Reference in a new issue