lib/sewing_kit/webpack/manifest/base.rb in sewing_kit-0.8.0 vs lib/sewing_kit/webpack/manifest/base.rb in sewing_kit-0.27.0

- old
+ new

@@ -6,11 +6,11 @@ def initialize @metadata = nil end # :nodoc: - def asset_paths(entrypoint_name) + def asset_dependencies(entrypoint_name) metadata['entrypoints'][entrypoint_name] end def clear_cache! @metadata = nil @@ -20,11 +20,11 @@ metadata['assets'] end def load_metadata_from_node begin - stdout, * = Open3.capture3('node_modules/.bin/sewing-kit', 'manifest', "-- mode #{mode}") + stdout, * = Open3.capture3('node_modules/.bin/sewing-kit', 'manifest', "--mode=#{mode}") rescue => e raise NodeSewingKitNotRunnable.new(mode, e) end begin @@ -32,13 +32,13 @@ rescue => e raise ManifestParseError, e end end - private + protected def mode - Rails.env.to_s || 'production' + ENV['NODE_ENV'] || Rails.env.to_s || 'production' end end end end end