class Guard::EmberTools
Public Class Methods
new(watchers = [], options = {})
click to toggle source
Calls superclass method
# File lib/guard/embertools.rb, line 8 def initialize(watchers = [], options = {}) super @options = { :debug => false, :no_cleanup => false, :out_file => nil }.merge(options) end
Public Instance Methods
compile_ember()
click to toggle source
# File lib/guard/embertools.rb, line 26 def compile_ember command = "ember build #{generate_cl_arguments}" puts command puts `#{command}` end
generate_cl_arguments()
click to toggle source
# File lib/guard/embertools.rb, line 32 def generate_cl_arguments args = [] args << "-d" if @options[:debug] args << "-c" if @options[:no_cleanup] args << "--out-file #{@options[:out_file]}" if @options[:out_file] args.join(' ') end
run_all()
click to toggle source
# File lib/guard/embertools.rb, line 17 def run_all compile_ember end
run_on_changes(path)
click to toggle source
# File lib/guard/embertools.rb, line 21 def run_on_changes(path) puts "detected changes in #{path.join(', ')}".yellow compile_ember end