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
20 21 22 23 24 25 26 |
# File 'lib/ember_cli/shell.rb', line 20 def build_and_watch unless running? lock_buildfile self.pid = spawn ember.build(watch: true) detach end end |
#compile ⇒ Object
16 17 18 |
# File 'lib/ember_cli/shell.rb', line 16 def compile run! ember.build end |
#install ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/ember_cli/shell.rb', line 35 def install if paths.gemfile.exist? run! "#{paths.bundler} install" end if invalid_ember_dependencies? clean_ember_dependencies! end run! "#{paths.npm} prune && #{paths.npm} install" run! "#{paths.bower} prune && #{paths.bower} install" end |
#stop ⇒ Object
28 29 30 31 32 33 |
# File 'lib/ember_cli/shell.rb', line 28 def stop if pid.present? Process.kill(:INT, pid) self.pid = nil end end |
#test ⇒ Object
48 49 50 |
# File 'lib/ember_cli/shell.rb', line 48 def test run! ember.test end |