Sha256: 21277bc3f772413db68a35094ded995cd00b1f227fe0e66417c674a46c4e1beb

Contents?: true

Size: 569 Bytes

Versions: 10

Compression:

Stored size: 569 Bytes

Contents

module Dashing
  module Generators
    class WidgetGenerator < ::Rails::Generators::NamedBase

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

      desc 'Creates a new Dashing widget.'

      def widget
        template 'widgets/new.html',    Dashing.config.widgets_views_path.join("#{file_name}.html")
        template 'widgets/new.scss',    Dashing.config.widgets_css_path.join('widgets', "#{file_name}.scss")
        template 'widgets/new.coffee',  Dashing.config.widgets_js_path.join('widgets', "#{file_name}.coffee")
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dashing-rails-2.6.2 lib/generators/dashing/widget_generator.rb
dashing-rails-2.6.1 lib/generators/dashing/widget_generator.rb
dashing-rails-2.6.0 lib/generators/dashing/widget_generator.rb
dashing-rails-2.5.0 lib/generators/dashing/widget_generator.rb
dashing-rails-2.4.5 lib/generators/dashing/widget_generator.rb
dashing-rails-2.4.4 lib/generators/dashing/widget_generator.rb
dashing-rails-2.4.3 lib/generators/dashing/widget_generator.rb
dashing-rails-2.4.2 lib/generators/dashing/widget_generator.rb
dashing-rails-2.4.1 lib/generators/dashing/widget_generator.rb
dashing-rails-2.4.0 lib/generators/dashing/widget_generator.rb