Sha256: 730d74b09d01412b6eba3ad3041bd2fd4b13fdd86d7cfac9e59bca248a9b119a

Contents?: true

Size: 1.79 KB

Versions: 4

Compression:

Stored size: 1.79 KB

Contents

module Hobo
  class AssetsGenerator < Rails::Generators::Base
    source_root File.expand_path('../templates', __FILE__)

    def self.banner
      "rails generate hobo:assets"
    end

    def copy_rapid_files
      template  'application.dryml.erb',        'app/views/taglibs/application.dryml'
      template  'front_site.dryml.erb',         'app/views/taglibs/front_site.dryml'
      #copy_file 'dryml-support.js',             'public/javascripts/dryml-support.js'
      copy_file 'dryml_taglibs_initializer.rb', 'config/initializers/dryml_taglibs.rb'
      copy_file 'guest.rb',                     'app/models/guest.rb'

      FileUtils.mv 'app/assets/stylesheets/application.css', 'app/assets/stylesheets/application.css.orig'
      copy_file 'application.scss',                        'app/assets/stylesheets/application.scss'
      copy_file 'gitkeep',                                'app/assets/stylesheets/application/.gitkeep'
      copy_file 'front.scss',                              'app/assets/stylesheets/front.scss'
      copy_file 'gitkeep',                                'app/assets/stylesheets/front/.gitkeep'

      FileUtils.mv 'app/assets/javascripts/application.js', 'app/assets/javascripts/application.js.orig'
      copy_file 'application.js',                        'app/assets/javascripts/application.js'
      copy_file 'gitkeep',                               'app/assets/javascripts/application/.gitkeep'
      copy_file 'front.js',                              'app/assets/javascripts/front.js'
      copy_file 'gitkeep',                               'app/assets/javascripts/front/.gitkeep'

      application "#"
      application "config.assets.precompile += %w(front.css front.js ajax-loader.gif)"
      application "# Hobo: the front subsite loads front.css & front.js"
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hobo-2.2.6 lib/generators/hobo/assets/assets_generator.rb
hobo-2.2.5 lib/generators/hobo/assets/assets_generator.rb
hobo-2.2.4 lib/generators/hobo/assets/assets_generator.rb
hobo-2.2.3 lib/generators/hobo/assets/assets_generator.rb