module Susanoo::CLI::Commands::Run

Provide the `run` command for project wide usage.

Public Instance Methods

run_in(platform = :android) click to toggle source
# File lib/susanoo/cli/project_interface/run.rb, line 13
def run_in(platform = :android)
  debug_flag = '--debug'
  debug_flag = '--release' if options[:release]

  Susanoo::Project.debug = false
  Susanoo::Project.debug = true if debug_flag == '--debug'

  # Build the project first
  build

  inside Susanoo::Project.path do
    debug_flag = '--debug'
    debug_flag = '--release' if options[:release]

    system "cordova run #{platform.to_s} #{debug_flag}"
  end
end