Sha256: 090cc79c13d27fd51850770fcb7a35501b6b2d62a41e22781202408cb954b029

Contents?: true

Size: 697 Bytes

Versions: 2

Compression:

Stored size: 697 Bytes

Contents

# frozen_string_literal: true

require 'parcel/rails/version'
require 'parcel/rails/runner'
require 'parcel/rails/parcel_generator' if defined?(Rails)

module Parcel
  # Parceljs integration with Rails
  module Rails
    if defined?(::Rails)
      module Rails
        class Application
          attr_accessor :parcel
        end
      end

      class Railtie < ::Rails::Railtie
        railtie_name :parcel

        rake_tasks do
          load 'parcel/rails/tasks.rake'
        end

        config.parcel = ActiveSupport::OrderedOptions.new
        config.parcel.entry_points = %w[app/javascript/application.js]
        config.parcel.destination = 'public/parcels'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
parcel-rails-0.9.3 lib/parcel-rails.rb
parcel-rails-0.9.2 lib/parcel-rails.rb