Class: EmberCli::Command
- Inherits:
-
Object
- Object
- EmberCli::Command
- Defined in:
- lib/ember_cli/command.rb
Instance Method Summary collapse
- #build(watch: false) ⇒ Object
-
#dev_server(host:, port:) ⇒ Object
Boots Vite's development server for an application generated with the Vite-based blueprint (
ember-cli >= 6.8). -
#initialize(paths:, options: {}) ⇒ Command
constructor
A new instance of Command.
- #test ⇒ Object
Constructor Details
#initialize(paths:, options: {}) ⇒ Command
5 6 7 8 |
# File 'lib/ember_cli/command.rb', line 5 def initialize(paths:, options: {}) @paths = paths @options = end |
Instance Method Details
#build(watch: false) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/ember_cli/command.rb', line 16 def build(watch: false) if paths.vite? vite_build else ember_build(watch: watch) end end |
#dev_server(host:, port:) ⇒ Object
Boots Vite's development server for an application generated with the
Vite-based blueprint (ember-cli >= 6.8). This is what the blueprint's
own npm start script runs.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ember_cli/command.rb', line 27 def dev_server(host:, port:) line = Terrapin::CommandLine.new(paths.vite, [ "--host :host", "--port :port", "--strictPort", "--clearScreen false", ].join(" ")) line.command(host: host.to_s, port: port.to_s) end |
#test ⇒ Object
10 11 12 13 14 |
# File 'lib/ember_cli/command.rb', line 10 def test line = Terrapin::CommandLine.new(paths.ember, "test --environment test") line.command end |