Sha256: a9026cfa8bc10e1c89659f3c7aee8abe213a9c0389e1be20f664ea2d3ba4b6a0
Contents?: true
Size: 1.09 KB
Versions: 1
Compression:
Stored size: 1.09 KB
Contents
class ProjectFilesGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) #this is for thor def copy_template_files gem_template_dir = File.expand_path('../templates', __FILE__) #this is for me : ) app_root = destination_root #copy view templates cmd = "mkdir -v #{app_root}/lib/templates" puts `#{cmd}` cmd = "cp -vR #{gem_template_dir}/view_templates/* #{app_root}/lib/templates/" puts `#{cmd}` #make shared dir cmd = "mkdir -v #{app_root}/app/views/shared/" puts `#{cmd}` #copy shared cmd = "cp -vR #{gem_template_dir}/views/shared/* #{app_root}/app/views/shared/" puts `#{cmd}` #copy layout cmd = "cp -vR #{gem_template_dir}/views/application.html.haml #{app_root}/app/views/layouts/" puts `#{cmd}` #remove erb layout file here #copy images cmd = "cp -vR #{gem_template_dir}/images/* #{app_root}/public/images/" puts `#{cmd}` #copy stylesheets cmd = "cp -vR #{gem_template_dir}/stylesheets/* #{app_root}/public/stylesheets/" puts `#{cmd}` end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pixelearth-0.0.2 | lib/generators/project_files/project_files_generator.rb |