lib/sewing_kit/webpack/compiler.rb in sewing_kit-0.27.2 vs lib/sewing_kit/webpack/compiler.rb in sewing_kit-0.27.3
- old
+ new
@@ -1,9 +1,13 @@
# frozen_string_literal: true
+require 'sewing_kit/webpack/webpack'
+
module SewingKit
module Webpack
class Compiler
def compile
+ raise NodeSewingKitNotRunnable, node_env unless File.exist?('node_modules/.bin/sewing-kit')
+
result = Kernel.system(
{ 'NODE_ENV' => node_env },
*command,
chdir: Rails.root.to_s,
out: $stdout,