Class: EmberCli::Shell
- Inherits:
-
Object
- Object
- EmberCli::Shell
- Defined in:
- lib/ember_cli/shell.rb
Instance Method Summary collapse
- #build_and_watch ⇒ Object
- #compile ⇒ Object
-
#initialize(paths:, env: {}, options: {}) ⇒ Shell
constructor
A new instance of Shell.
- #install ⇒ Object
- #stop ⇒ Object
- #test ⇒ Object
Constructor Details
Instance Method Details
#build_and_watch ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/ember_cli/shell.rb', line 19 def build_and_watch unless running? lock_buildfile self.pid = spawn ember.build(watch: true) detach end end |
#compile ⇒ Object
15 16 17 |
# File 'lib/ember_cli/shell.rb', line 15 def compile silence_build { exec ember.build } end |
#install ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/ember_cli/shell.rb', line 34 def install if paths.gemfile.exist? exec "#{paths.bundler} install" end exec "#{paths.npm} prune && #{paths.npm} install" exec "#{paths.bower} prune && #{paths.bower} install" end |
#stop ⇒ Object
27 28 29 30 31 32 |
# File 'lib/ember_cli/shell.rb', line 27 def stop if pid.present? Process.kill(:INT, pid) self.pid = nil end end |
#test ⇒ Object
43 44 45 |
# File 'lib/ember_cli/shell.rb', line 43 def test exec ember.test end |