Sha256: fc0a7b01f98ab12a659161af9dd4f72e8be9d1528e052875c392621a67548445

Contents?: true

Size: 1.28 KB

Versions: 9

Compression:

Stored size: 1.28 KB

Contents

# frozen_string_literal: true

# NEW GEM ADDONS
# lib/rails_app_generator/app_generator.rb
#   class_option :add_<%= data.name_snake %>, type: :boolean, default: false
#   add_if(:<%= data.name_snake %>)
# lib/rails_app_generator/options/rails_options.rb
#   register_option :add_<%= data.name_snake %>, type: :boolean, default: false

module RailsAppGenerator
  # Custom add-ons for RailsAppGenerator
  module AddOns
    # Add <%= data.name_camel %> to rails application
    class <%= data.name_camel %> < AddOn
<%= data.addon_config_code %>
      def apply
        say 'Setting up <%= data.name_camel %>'
        # template('<%= data.name_snake%>_template.rb', 'target/<%= data.name_snake%>.rb', force: true)
        # template('app/javascript/stylesheets/components.scss')
        # create_file('target/<%= data.name_snake%>.rb', 'put your content here')
        # directory 'app/template', 'app/target', force: true
        # empty_directory 'app/target'
        # inject_into_file('app/application.js', "some content")
        # rails_command('tailwindcss:install')
      end

      def before_bundle
        say 'Setting up <%= data.name_camel %> - before bundle install'
      end

      def after_bundle
        say 'Setting up <%= data.name_camel %> - after bundle install'
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rails_app_generator-0.1.26 templates/thor_task/addon/addon.tt
rails_app_generator-0.1.25 templates/thor_task/addon/addon.tt
rails_app_generator-0.1.24 templates/thor_task/addon/addon.tt
rails_app_generator-0.1.23 templates/thor_task/addon/addon.tt
rails_app_generator-0.1.22 templates/thor_task/addon/addon.tt
rails_app_generator-0.1.21 templates/thor_task/addon/addon.tt
rails_app_generator-0.1.20 templates/thor_task/addon/addon.tt
rails_app_generator-0.1.19 templates/thor_task/addon/addon.tt
rails_app_generator-0.1.18 templates/thor_task/addon/addon.tt