Sha256: d760da7869c2a1b3148a6927da374632e16215452b6381d4326c35b7d02df27b

Contents?: true

Size: 583 Bytes

Versions: 1

Compression:

Stored size: 583 Bytes

Contents

module SewingKit
  module Webpack
    class Dev
      attr_accessor :pid

      def start
        @pid = spawn
        detach
      end

      private

      def spawn
        Kernel.spawn(
          {
            'NODE_ENV' => 'development',
            'BLUEBIRD_DEBUG' => 0,
            'BLUEBIRD_LONG_STACK_TRACES' => 0,
          },
          'node_modules/.bin/sewing-kit',
          'dev',
          chdir: Rails.root.to_s,
          out: $stdout,
          err: $stderr,
        ) || exit(1)
      end

      def detach
        Process.detach pid
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sewing_kit-0.5.6 lib/sewing_kit/webpack/dev.rb