Class: WpFire::BuildCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/wp_fire/main_command.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/wp_fire/main_command.rb', line 21

def execute
  @assets_path = File.join(dir,"source","assets")
  @templates_path = File.join(dir,"source","templates")
  @functions_path = File.join(dir,"source","functions")

  @build_path = File.join(dir,"build")
  FileUtils.rm_rf(@build_path) if File.directory?(@build_path)
  Dir.mkdir @build_path
  watch_directories = [@assets_path,@templates_path,@functions_path]
  WpFire::Compiler.compile_all watch_directories, @build_path
end