Class: Lanes::Command::Jest
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Lanes::Command::Jest
- Includes:
- Thor::Actions
- Defined in:
- lib/lanes/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/lanes/command/jest.rb', line 11 def config @config end |
Instance Method Details
#config_file ⇒ Object
22 23 24 |
# File 'lib/lanes/command/jest.rb', line 22 def config_file config.directory.join('jest.config.json') end |
#configure ⇒ Object
16 17 18 19 20 |
# File 'lib/lanes/command/jest.rb', line 16 def configure @config = ClientConfig.new @config.invoke_all self end |
#start ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/lanes/command/jest.rb', line 26 def start say 'Starting Jest', :green say Dir.pwd, :yellow cmd = "$(npm bin)/jest --config #{config_file}" cmd << " --watch" if [:watch] exec(cmd) end |