Sha256: 08ed7a1204f431b7b47a54259187312a3eceeccc3b22ed324e8dd8dd2e20aa98

Contents?: true

Size: 733 Bytes

Versions: 37

Compression:

Stored size: 733 Bytes

Contents

# frozen_string_literal: true

module RailsAppGenerator
  # Custom add-ons for RailsAppGenerator
  module AddOns
    # Add default rails views
    class Views < AddOn
      depends_on :tailwind

      def apply
        say 'Setting up custom landing page'
        directory 'app/views/layouts', 'app/views/layouts', force: true
        directory 'app/views/shared', 'app/views/shared'
        directory 'app/views/pages', 'app/views/pages' if uses?(:high_voltage)
        # Make sure we can access any images put into the images folder
        inject_into_file('app/javascript/packs/application.js', "require.context('../images', true)")
        directory 'app/javascript/images', 'app/javascript/images'
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
rails_app_generator-0.1.26 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.25 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.24 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.23 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.22 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.21 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.20 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.19 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.18 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.17 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.16 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.15 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.14 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.13 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.12 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.11 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.10 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.9 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.8 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.7 lib/rails_app_generator/addons/views.rb