Class: Ddenv::Goals::NpmPackesInstalled
Instance Method Summary
collapse
Methods inherited from Ddenv::Goal
#==, #eql?, #hash, #initialize, #post_goals, #pre_goals, #props, #with_pre_and_post_goals
Constructor Details
This class inherits a constructor from Ddenv::Goal
Instance Method Details
#achieve ⇒ Object
19
20
21
22
23
|
# File 'lib/ddenv/goals/npm_packages_installed.rb', line 19
def achieve
cmd = TTY::Command.new(printer: :null)
cmd.run("shadowenv", "exec", "--", "npm", "install")
end
|
#achieved? ⇒ Boolean
10
11
12
13
14
15
16
17
|
# File 'lib/ddenv/goals/npm_packages_installed.rb', line 10
def achieved?
cmd = TTY::Command.new(printer: :null)
cmd.run("shadowenv", "exec", "--", "npx", "check-dependencies")
true
rescue StandardError
false
end
|
#message ⇒ Object
6
7
8
|
# File 'lib/ddenv/goals/npm_packages_installed.rb', line 6
def message
"Installing npm packages"
end
|