Class: Hippo::Command::Jest
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Hippo::Command::Jest
- Includes:
- Thor::Actions
- Defined in:
- lib/hippo/command/jest.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
11 12 13 |
# File 'lib/hippo/command/jest.rb', line 11 def config @config end |
Instance Method Details
#config_file ⇒ Object
26 27 28 |
# File 'lib/hippo/command/jest.rb', line 26 def config_file config.directory.join('jest.config.json') end |
#configure ⇒ Object
19 20 21 22 23 24 |
# File 'lib/hippo/command/jest.rb', line 19 def configure @extension ||= Command.load_current_extension(raise_on_fail:true) @config = Hippo::Webpack::ClientConfig.new @config.invoke_all self end |
#start ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/hippo/command/jest.rb', line 30 def start say 'Starting Jest', :green say Dir.pwd, :yellow cmd = "$(npm bin)/jest --config #{config_file}" .each do |key, value| cmd << " --#{key}" if value end say cmd, :green exec(cmd) end |