Sha256: 31c731f3650477503fe03f7b0007a0c2a810089cb22066ea5993f10733fab2d4

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

class JfsJqueryGenerator < Rails::Generator::Base
  
  def manifest
    record do |m|
      m.directory 'public/javascripts'
      
      m.file 'jquery.min.js', 'public/javascripts/jquery.min.js'
      unless options[:skip_ui]
        m.file 'jquery-ui.min.js', 'public/javascripts/jquery-ui.min.js'
      end
    end
  end
 
  protected
 
  def add_options!(opt)
    opt.separator ''
    opt.separator 'Options:'
    opt.on("--skip-ui", "Do not include jQuery UI.") { |v| options[:skip_ui] = v }
  end

  def banner
    <<-END
Generates the javascript files for jQuery and jQuery UI.

USAGE: #{$0} #{spec.name}
END
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jfs-generators-0.2.0 rails_generators/jfs_jquery/jfs_jquery_generator.rb