Method: MHaml::Generators::InstallGenerator#inject_mustache
- Defined in:
- lib/generators/mhaml/install/install_generator.rb
#inject_mustache ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/generators/mhaml/install/install_generator.rb', line 17 def inject_mustache manifest = [:manifest] template_dir = [:template_dir] create_file("#{js_path}/#{manifest}") unless File.exists?("#{js_path}/#{manifest}") append_to_file "#{js_path}/#{manifest}" do out = "" out << "//= require mustache" out << "\n" out << "//= require_tree ../../#{template_dir}" out << "\n" out << "\n" end end |