Sha256: 798e8eb7866cbb6854631dc4cec6c25b4969aed46592bf4ef759ad16651777b4
Contents?: true
Size: 1.11 KB
Versions: 2
Compression:
Stored size: 1.11 KB
Contents
require 'rake' require 'rails/generators' # ================================== # = rails g rails_markitup:install = # ================================== module RailsMarkitup module Generators class InstallGenerator < Rails::Generators::Base source_root File.expand_path('../media', __FILE__) desc "Copies media files to main project" 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" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails_markitup-0.0.2 | lib/generators/rails_markitup/install_generator.rb |
rails_markitup-0.0.1 | lib/generators/rails_markitup/install_generator.rb |