Class: SewingKit::Webpack::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/sewing_kit/webpack/server.rb

Defined Under Namespace

Classes: DefaultEntrypointMissing

Instance Method Summary collapse

Instance Method Details

#startObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/sewing_kit/webpack/server.rb', line 14

def start
  raise DefaultEntrypointMissing unless File.exist?(default_entrypoint)

  result = Kernel.system(
    {},
    *command,
    chdir: Rails.root.to_s,
    out: $stdout,
    err: $stderr
  )

  unless result
    puts "sewing_kit:server:start failed"
    exit(1)
  end

  result
end