Sha256: e76b9e74604bcabbbdacd81f0e15643c2036e68d41e30349de0080a629eff6c8

Contents?: true

Size: 544 Bytes

Versions: 6

Compression:

Stored size: 544 Bytes

Contents

module Scribo
  class InstallGenerator < Rails::Generators::Base
    source_root File.expand_path("../templates", __FILE__)

    def create_initializer_file
      template "config/initializers/scribo.rb"
    end

    def add_route
      return if Rails.application.routes.routes.detect { |route| route.app.app == Scribo::Engine }
      route %(mount Scribo::Engine => "/scribo")
    end

    def copy_migrations
      rake "scribo:install:migrations"
    end

    def tailwindcss_config
      rake "scribo:tailwindcss:config"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
scribo-1.0.44 lib/generators/scribo/install_generator.rb
scribo-1.0.43 lib/generators/scribo/install_generator.rb
scribo-1.0.42 lib/generators/scribo/install_generator.rb
scribo-1.0.41 lib/generators/scribo/install_generator.rb
scribo-1.0.40 lib/generators/scribo/install_generator.rb
scribo-1.0.39 lib/generators/scribo/install_generator.rb