Sha256: 517497c627408ff412a0c68eeee650083785454c5518e4601c7de34b263f69bf

Contents?: true

Size: 608 Bytes

Versions: 43

Compression:

Stored size: 608 Bytes

Contents

# frozen_string_literal: true

# You can replace this implementation with your own for use by the
# ReactOnRails::TestHelper.ensure_assets_compiled helper
module ReactOnRails
  module TestHelper
    class WebpackAssetsCompiler
      def compile_assets
        puts "\nBuilding Webpack assets..."

        cmd = ReactOnRails::Utils.prepend_cd_node_modules_directory(
          ReactOnRails.configuration.build_test_command
        )

        ReactOnRails::Utils.invoke_and_exit_if_failed(cmd, "Error in building webpack assets!")

        puts "Completed building Webpack assets."
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
react_on_rails-9.0.0 lib/react_on_rails/test_helper/webpack_assets_compiler.rb
react_on_rails-9.0.0.rc.0 lib/react_on_rails/test_helper/webpack_assets_compiler.rb
react_on_rails-9.0.0.beta.12 lib/react_on_rails/test_helper/webpack_assets_compiler.rb