Sha256: fd24994c1f7a92bbbf3d320b12852343a25a74e624374e71e7a6ccd1ed367425

Contents?: true

Size: 1.27 KB

Versions: 35

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true

# lib/rails_app_generator/rag_initializer.rb
# add_if(:<%= data.name_snake %>)
# rag.add_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 %> < RailsAppGenerator::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_template
        say 'Setting up <%= data.name_camel %> - before custom template'
      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

35 entries across 35 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 templates/thor_task/addon/addon.tt
rails_app_generator-0.3.5 templates/thor_task/addon/addon.tt
rails_app_generator-0.3.4 templates/thor_task/addon/addon.tt
rails_app_generator-0.3.3 templates/thor_task/addon/addon.tt
rails_app_generator-0.3.2 templates/thor_task/addon/addon.tt
rails_app_generator-0.3.1 templates/thor_task/addon/addon.tt
rails_app_generator-0.3.0 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.43 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.42 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.41 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.40 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.39 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.38 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.37 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.36 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.35 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.34 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.33 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.32 templates/thor_task/addon/addon.tt
rails_app_generator-0.2.31 templates/thor_task/addon/addon.tt