lib/sewing_kit/webpack/dev.rb in sewing_kit-0.7.1 vs lib/sewing_kit/webpack/dev.rb in sewing_kit-0.8.0

- old
+ new

@@ -1,18 +1,18 @@ +# frozen_string_literal: true module SewingKit module Webpack - class NodeSewingKitNotInstalled < StandardError - def initialize() - super( - "sewing-kit is not available. " + - "Please add `@shopify/sewing-kit` to package.json's `devDependencies`, " + - "and run `yarn install`." - ) + class Dev + class NodeSewingKitNotInstalled < StandardError + def initialize + super( + "sewing-kit is not installed. " \ + "Try `yarn add --dev @shopify/sewing-kit`" + ) + end end - end - class Dev attr_accessor :pid def start @pid = spawn detach @@ -20,10 +20,10 @@ private def spawn sewing_kit_bin = 'node_modules/.bin/sewing-kit' - raise NodeSewingKitNotInstalled.new unless File.exist?(sewing_kit_bin) + raise NodeSewingKitNotInstalled unless File.exist?(sewing_kit_bin) Kernel.spawn( { 'NODE_ENV' => 'development', 'BLUEBIRD_DEBUG' => '0',