Sha256: 36e5f53bc6a46447a6722b509eb8059be1ae6e811ef950843de36943f81acf47

Contents?: true

Size: 889 Bytes

Versions: 26

Compression:

Stored size: 889 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Webpacker
    module Runner
      def self.included(base)
        base.alias_method :original_initialize, :initialize
        base.send :private, :original_initialize

        base.define_method :initialize do |argv|
          original_initialize(argv)
          decidim_initialize(argv)
        end
      end

      private

      def decidim_initialize(_argv)
        # Write runtime configuration for Tailwind
        # This method is called here because in Decidim CSS compilation is done via Webpack.
        # If CSS is decoupled from JS in the future, this call should be removed.
        Decidim::Assets::Tailwind.write_runtime_configuration

        # Write the runtime configuration and override the configuration
        @shakapacker_config = Decidim::Webpacker.configuration.configuration_file
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
decidim-0.29.1 decidim-core/lib/decidim/webpacker/runner.rb
decidim-core-0.29.1 lib/decidim/webpacker/runner.rb
decidim-0.28.4 decidim-core/lib/decidim/webpacker/runner.rb
decidim-core-0.28.4 lib/decidim/webpacker/runner.rb
decidim-0.29.0 decidim-core/lib/decidim/webpacker/runner.rb
decidim-core-0.29.0 lib/decidim/webpacker/runner.rb
decidim-0.28.3 decidim-core/lib/decidim/webpacker/runner.rb
decidim-core-0.28.3 lib/decidim/webpacker/runner.rb
decidim-0.29.0.rc4 decidim-core/lib/decidim/webpacker/runner.rb
decidim-core-0.29.0.rc4 lib/decidim/webpacker/runner.rb
decidim-0.29.0.rc3 decidim-core/lib/decidim/webpacker/runner.rb
decidim-core-0.29.0.rc3 lib/decidim/webpacker/runner.rb
decidim-0.29.0.rc2 decidim-core/lib/decidim/webpacker/runner.rb
decidim-core-0.29.0.rc2 lib/decidim/webpacker/runner.rb
decidim-0.29.0.rc1 decidim-core/lib/decidim/webpacker/runner.rb
decidim-core-0.29.0.rc1 lib/decidim/webpacker/runner.rb
decidim-0.28.2 decidim-core/lib/decidim/webpacker/runner.rb
decidim-core-0.28.2 lib/decidim/webpacker/runner.rb
decidim-0.28.1 decidim-core/lib/decidim/webpacker/runner.rb
decidim-core-0.28.1 lib/decidim/webpacker/runner.rb