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.6 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.5 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.4 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.3 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.2 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.1 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.1.0 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.0.15 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.0.14 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.0.13 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.0.12 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.0.11 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.0.10 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.0.9 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.0.8 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.0.7 lib/rails_app_generator/addons/views.rb
rails_app_generator-0.0.6 lib/rails_app_generator/addons/views.rb