Skip to content

Commit 2830360

Browse files
authored
CPD-6052 | Minifying template by default. (#272)
1 parent d5d2960 commit 2830360

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/moonshot/dynamic_template.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,15 @@ def validate_template(template)
6363
end
6464

6565
def generate_template
66-
ERB.new(@source).result(parameters_obj.expose_binding)
66+
ERB.new(minify_template_source).result(parameters_obj.expose_binding)
6767
end
6868

6969
def write_output(content)
7070
File.write(@destination, content)
7171
end
72+
73+
def minify_template_source
74+
JSON.parse(@source).to_json
75+
end
7276
end
7377
end

0 commit comments

Comments
 (0)