Module: Webpacker

Extended by:
Webpacker
Included in:
Webpacker
Defined in:
lib/webpacker.rb,
lib/webpacker/runner.rb,
lib/webpacker/version.rb,
lib/webpacker/webpack_runner.rb,
lib/webpacker/dev_server_runner.rb

Defined Under Namespace

Modules: Helper Classes: Commands, Compiler, Configuration, DevServer, DevServerProxy, DevServerRunner, Engine, Env, Instance, Manifest, Runner, WebpackRunner

Constant Summary collapse

VERSION =

Change the version in package.json too, please!

"6.0.0.rc.6".freeze

Instance Method Summary collapse

Instance Method Details

#ensure_log_goes_to_stdoutObject



25
26
27
28
29
30
31
# File 'lib/webpacker.rb', line 25

def ensure_log_goes_to_stdout
  old_logger = Webpacker.logger
  Webpacker.logger = Logger.new(STDOUT)
  yield
ensure
  Webpacker.logger = old_logger
end

#instanceObject



13
14
15
# File 'lib/webpacker.rb', line 13

def instance
  @instance ||= Webpacker::Instance.new
end

#instance=(instance) ⇒ Object



9
10
11
# File 'lib/webpacker.rb', line 9

def instance=(instance)
  @instance = instance
end

#with_node_env(env) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/webpacker.rb', line 17

def with_node_env(env)
  original = ENV["NODE_ENV"]
  ENV["NODE_ENV"] = env
  yield
ensure
  ENV["NODE_ENV"] = original
end