Class: RailsMarkitup::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/rails_markitup/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_media_filesObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/generators/rails_markitup/install_generator.rb', line 15

def copy_media_files
  path = File.expand_path('../media', __FILE__)
  @images = FileList["#{path}/images/*"]
  @images.each do |image|
    copy_file "#{image}", "public/stylesheets/markitup/image/#{image.split('/').last}"
  end
  copy_file "../media/javascripts/jquery.markitup.js",          "public/javascripts/markitup/jquery.markitup.js"
  copy_file "../media/javascripts/sets/markdown/set.js",        "public/javascripts/markitup/sets/markdown/set.js"
  copy_file "../media/stylesheets/sets/markdown/style.css",     "public/stylesheets/markitup/sets/markdown/style.css"
  copy_file "../media/stylesheets/skins/markitup/style.css",    "public/stylesheets/markitup/skins/markdown/style.css"
  copy_file "../media/stylesheets/skins/markitup/bright.css",   "public/stylesheets/markitup/skins/markdown/bright.css"
  copy_file "../media/stylesheets/skins/markitup/pygments.css", "public/stylesheets/markitup/skins/markdown/pygments.css"
  copy_file "../media/stylesheets/skins/markitup/shiny.css",    "public/stylesheets/markitup/skins/markdown/shiny.css"
end