Method: ViteRuby::Commands#build_from_task

Defined in:
lib/vite_ruby/commands.rb

#build_from_task(*args) ⇒ Object

Public: Defaults to production, and exits if the build fails.



11
12
13
14
15
16
17
# File 'lib/vite_ruby/commands.rb', line 11

def build_from_task(*args)
  with_node_env(ENV.fetch("NODE_ENV", "production")) {
    ensure_log_goes_to_stdout {
      build(*args) || exit!
    }
  }
end