lib/nake/file_task.rb
def call(args = Array.new, options = Hash.new)
      will_run = true
      unless self.dependencies.empty?
        info "Invoking file task #{name}"
        will_run = self.invoke_dependencies(*args, options)
      end
      if will_run && ! self.blocks.empty?
        note "Executing file task #{name} with arguments #{args.inspect} and options #{options.inspect}"
        debug "Config #{self.config.inspect}"
        self.blocks.each do |block|
          block.call(self.path, *args, options)
        end
      else
        warn "File task #{name} won't be executed"
      end
    end
# FileTask can depend on tasks, other file tasks or just files.
# If a file task depends on a task, this task isn't supposed to change anything what ...
# ... if it's changing something, make sure the changing task is actually called before the file tasks are executed
# If the task is changing something so the file will be generated in all cases, you should rather to use normal task
# If there are some dependencies on files
# FileTask.new("www/index.html") do |task|
#   task.file_dependencies.push(*FileList["images/**/*"])
#   task.dependencies.push("www") # www task exist
# end
FileTask can depend on tasks, other file tasks or just files.
FileTask can depend on tasks other file tasks or just files .
def call(args = Array.new, options = Hash.new)
      will_run = true
      unless self.dependencies.empty?
        info "Invoking file task #{name}"
        will_run = self.invoke_dependencies(*args, options)
      end
      if will_run && ! self.blocks.empty?
        note "Executing file task #{name} with arguments #{args.inspect} and options #{options.inspect}"
        debug "Config #{self.config.inspect}"
        self.blocks.each do |block|
          block.call(self.path, *args, options)
        end
      else
        warn "File task #{name} won't be executed"
      end
    end
def call ( args = Array . new , options = Hash . new ) will_run = true unless self . dependencies . empty? info "Invoking file task #{name}" will_run = self . invoke_dependencies ( * args , options ) end if will_run && ! self . blocks . empty? note "Executing file task #{name} with arguments #{args.inspect} and options #{options.inspect}" debug "Config #{self.config.inspect}" self . blocks . each do | block | block . call ( self . path , * args , options ) end else warn "File task #{name} won't be executed" end end
FileTask can depend on tasks, other file tasks or just files.
FileTask can depend on tasks other file tasks or just files .
args
new
options