Class: Guard::EmberTools
Instance Method Summary collapse
- #compile_ember ⇒ Object
- #generate_cl_arguments ⇒ Object
-
#initialize(watchers = [], options = {}) ⇒ EmberTools
constructor
A new instance of EmberTools.
- #run_all ⇒ Object
- #run_on_changes(path) ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ EmberTools
Returns a new instance of EmberTools.
8 9 10 11 12 13 14 15 |
# File 'lib/guard/embertools.rb', line 8 def initialize(watchers = [], = {}) super = { :debug => false, :no_cleanup => false, :out_file => nil }.merge() end |
Instance Method Details
#compile_ember ⇒ Object
26 27 28 29 30 |
# File 'lib/guard/embertools.rb', line 26 def compile_ember command = "ember build #{generate_cl_arguments}" puts command puts `#{command}` end |
#generate_cl_arguments ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/guard/embertools.rb', line 32 def generate_cl_arguments args = [] args << "-d" if [:debug] args << "-c" if [:no_cleanup] args << "--out-file #{@options[:out_file]}" if [:out_file] args.join(' ') end |
#run_all ⇒ Object
17 18 19 |
# File 'lib/guard/embertools.rb', line 17 def run_all compile_ember end |
#run_on_changes(path) ⇒ Object
21 22 23 24 |
# File 'lib/guard/embertools.rb', line 21 def run_on_changes(path) puts "detected changes in #{path.join(', ')}".yellow compile_ember end |