Sha256: 6000b73721f55e64cad36b89584c2a128a1d1d9773d77b5bdb6df851e9f4da42

Contents?: true

Size: 1.11 KB

Versions: 11

Compression:

Stored size: 1.11 KB

Contents

# -*- encoding : utf-8 -*-
# Copy Blacklight assets to public folder in current app. 
# If you want to do this on application startup, you can
# add this next line to your one of your environment files --
# generally you'd only want to do this in 'development', and can
# add it to environments/development.rb:
#       require File.join(Hydra.root, "lib", "generators", "hydra", "assets_generator.rb")
#       Hydra::Assets.start(["--force", "--quiet"])


# Need the requires here so we can call the generator from environment.rb
# as suggested above. 
require 'rails/generators'
require 'rails/generators/base'
module Hydra
  class AssetsGenerator < Rails::Generators::Base
    source_root File.expand_path('../templates', __FILE__)
  
    def assets
      insert_into_file "app/assets/stylesheets/application.css", :after => " *= require_self" do
%q{
 *
 * Required by Hydra
 *= require 'hydra/styles'         
}
      end

      insert_into_file "app/assets/javascripts/application.js", :after => "//= require jquery_ujs" do
%q{
// Required by Hydra
//= require 'jquery.ui.datepicker.js'      
}          
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
hydra-file-access-5.4.1 lib/generators/hydra/assets_generator.rb
hydra-file-access-5.4.0.pre1 lib/generators/hydra/assets_generator.rb
hydra-file-access-5.3.0 lib/generators/hydra/assets_generator.rb
hydra-file-access-5.1.0 lib/generators/hydra/assets_generator.rb
hydra-file-access-5.0.1 lib/generators/hydra/assets_generator.rb
hydra-file-access-5.0.0 lib/generators/hydra/assets_generator.rb
hydra-file-access-5.0.0.rc1 lib/generators/hydra/assets_generator.rb
hydra-file-access-5.0.0.pre15 lib/generators/hydra/assets_generator.rb
hydra-file-access-5.0.0.pre14 lib/generators/hydra/assets_generator.rb
hydra-file-access-5.0.0.pre13 lib/generators/hydra/assets_generator.rb
hydra-file-access-5.0.0.pre12 lib/generators/hydra/assets_generator.rb