Class: Hippo::Command::Webpack

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/hippo/command/webpack.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

Returns the value of attribute config.



14
15
16
# File 'lib/hippo/command/webpack.rb', line 14

def config
  @config
end

#webpackObject (readonly)

Returns the value of attribute webpack.



12
13
14
# File 'lib/hippo/command/webpack.rb', line 12

def webpack
  @webpack
end

#wpd_configObject (readonly)

Returns the value of attribute wpd_config.



16
17
18
# File 'lib/hippo/command/webpack.rb', line 16

def wpd_config
  @wpd_config
end

Instance Method Details

#launchObject



25
26
27
# File 'lib/hippo/command/webpack.rb', line 25

def launch
    @webpack = Hippo::Webpack.new
end

#set_production_envObject



20
21
22
23
# File 'lib/hippo/command/webpack.rb', line 20

def set_production_env
    ext = Command.load_current_extension
    Hippo.config.environment = :production if options[:compile]
end

#startupObject



29
30
31
32
33
# File 'lib/hippo/command/webpack.rb', line 29

def startup
    process = webpack.process
    process.start
    process.wait
end