Sha256: 7268934a8796887f41eebf5b49c099360b8e564e31e6703dadf563a95f47c94d

Contents?: true

Size: 700 Bytes

Versions: 4

Compression:

Stored size: 700 Bytes

Contents

module Trestle
  module Generators
    class InstallGenerator < ::Rails::Generators::Base
      desc "Installs Trestle and creates files for configuration and asset customization"

      source_root File.expand_path("../templates", __FILE__)

      def create_initializer
        template "trestle.rb.erb", "config/initializers/trestle.rb"
      end

      def create_assets
        css = (defined?(Sass) || defined?(SassC)) ? "scss" : "css"
        template "_custom.#{css}", "app/assets/stylesheets/trestle/_custom.#{css}"
        template "custom.js", "app/assets/javascripts/trestle/custom.js"
      end

      def create_directory
        empty_directory "app/admin"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trestle-0.10.1 lib/generators/trestle/install/install_generator.rb
trestle-0.10.0 lib/generators/trestle/install/install_generator.rb
trestle-0.10.0.pre2 lib/generators/trestle/install/install_generator.rb
trestle-0.10.0.pre lib/generators/trestle/install/install_generator.rb